iamceege/tooltipster — pull request #63 by evangun (2013-10-24 13:56:01+00:00)
Title: Added an init callback function in options

Added a callback function in the options, called when the tooltip is initialized.

This function receives two parameters : the ORIGIN and the CONTENT which is about to be used for the tooltip. If the function returns something, this result will overwrite CONTENT. This behaviour is handy because the .tooltipster('update', data) method does not work yet at init time.

The main purpose of this is to allow a change on-the-fly from the original Title attribute to the content that will be inserted into the tooltip. It often makes sense to do this change *only once* at initialization and not everytime the tooltip appears (with functionBefore). It may also be used to load stuff once via Ajax as soon as a tooltip is initialized, etc.