Jquery tooltipster plugin, hide all tips?
2 answers
It's simple, you just need to separate your selectors with a comma :
$('form input, #mydiv').tooltipster('hide');
If you don't know the exact elements containing the tooltipster, you can use the method filter
:
$('*').filter(function() {
return $(this).data('tooltipsterNs');
}).tooltipster('hide');
+4
source to share
Tooltipster adds a CSS class to elements with a tooltips attached: "tooltipstered".
So one of the methods is to call
$('.tooltipstered').tooltipster('close');
Edit : With Tooltipster v4, you can do this with publicly available methods, which are always better. Also, it also works when you use tooltips with an option multiple
, while my previous answer:
var instances = $.tooltipster.instances();
$.each(instances, function(i, instance){
instance.close();
});
+10
source to share