Tooltip not disappearing

S R picture S R · Oct 9, 2013 · Viewed 8.4k times · Source

I have jQuery tooltip activated for all elements in my page. One of those elements is an AJAX 'Submit' button that is immediately disabled (on click) and then vanishes (the div containing it is overwritten by the AJAX response)

My problem is that the tooltip continues to remain on screen even after the button is clicked/vanishes. Have tried these codes, but to no use (no all together, but any one):

$("#signup").tooltip({events: {input: 'click, blur'}});
$("#signup").tooltip("disable"); 
$("#signup").tooltip().hide(300);
$("#signup").tooltip("close");

Followed by

document.getElementById('signup').disabled=true;

And then the Ajax call.

Answer

Donovan Charpin picture Donovan Charpin · Oct 9, 2013

You can use remove() to remove the tooltip

 $(".ui-tooltip-content").parents('div').remove();