Ricardo Rocha Ricardo Rocha - 1 year ago 95
CSS Question

[Tooltipster Plugin]- Know if div already have tooltipster

I'm using this plugin http://iamceege.github.io/tooltipster/.

It is possible know if a HTML already have the tooltipster initialized?

I wanna know because sometimes i need to change the text of the tooltip, and for do that, i need to destroy the tooltipster, change the attribute title of the HTML object, and initialize again. Like this:

$(this).tooltipster('destroy').attr("title", data.fields[i].value).tooltipster();

Answer Source

You can use the API:

Check if the element already has tooltipster:


$(...).tooltipster('content', myNewContent);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download