qTip (jQuery plug-in) how can I remove all qtips in my page?

后端 未结 10 2031
醉话见心
醉话见心 2021-02-04 00:30

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-al         


        
10条回答
  •  情深已故
    2021-02-04 01:15

    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.

提交回复
热议问题