views:

355

answers:

2

hi,

I'm using the jquery-plugin qTip. What's the command to destroy all tooltips in my page ?

I tried:

$('.option img[title], span.taxonomy-image-link-alter img[title]').qtip("destroy");

But it didn't work... Thanks

+1  A: 

Looks buggy. I've had some luck with this, but it does not restore the original titles. I suspect destroy doesn't do that either...

$('span.taxonomy-image-link-alter img')
    .filter(function(){return $(this).data('qtip');})
    .qtip('destroy');

It seems you cannot call destroy on elements without qTip - it doesn't fail silently, but throws an exception and stops the loop.

Kobi
i've solved in this way: $(".qtip").remove(); I remove all elements added by qTip on the bottom of the page
Patrick
@Patrick - that sound better, although it might leave behind some data and event handlers. My version isn't any better though... You should add another answer and accept it.
Kobi
+2  A: 

I've solved with $(".qtip").remove();

Patrick