You can verify that it should be created or just included:
if (!$(id).hasClass("tooltipstered")) {
$(id).tooltipster({
position: 'top-left',
contentAsHTML: 'true',
theme: '.tooltipster-default',
animation: 'grow'
});
} else {
$(id).tooltipster('enable');
}
Before disabling it, make sure you check it.
if ($(id).hasClass("tooltipstered")) {
$(id).tooltipster('disable');
}
source
share