Custom tooltip effect
Here you can see a customized "bouncy" tooltip effect. We set up things similarly as in the basic setup, but we have modified the sliding effect with our own:
HTML coding
A simple setup with the tooltip element and the triggers:
Creating the effect
We start by adding a new animation algorithm for jQuery called "bouncy". This is possible by extending the jQuery.easing object. I grabbed this easing function from the jQuery Easing Plugin's source code. There are quite a lot of different easing algorithms that you can try.
Custom tooltip effects are done with the $.tools.tooltip.addEffect method. The first argument is the effect name, the second argument is the function that defines how the tooltip is shown and the third argument defines how the tooltip closes. Inside the functions the this variable is a reference to the tooltip API.
Note: you can get access to the configuration option with the this.getConf() method, and you can use this object to supply custom configuration options as well.
JavaScript coding
Here is the tooltip configuration. We supply our newly created tooltip effect with the effect configuration variable.