Added callback parameters for show and hide methods
The show
and hide
API methods now accept an optional parameter : a callback function. These callbacks will be called when the show/hide animations are over. This allows finer-grained control over individual tooltip interactions than the existing and more general constructor functionReady
and functionAfter
callbacks.
This translates in : $(el).tooltipster('show', myFunction(){ ... })
and $(el).tooltipster('hide', myFunction(){ ... })
Also, functionBefore
will now be called everytime a tooltip's trigger is triggered (and at each call of the show
method). Previously, it would not be called if the content of the tooltip was null
. For people who instantiated Tooltipster with no content and were counting on the first functionBefore
call (which never happened) to load content on-the-fly, this was unexpected.