I am creating an icon in javascript with tooltip.
var icon = ' <a class="icon-ok" data-type="reftooltip" title="Save" style="cursor: pointer"></a>';
this icon is displayed and removed dynamically. When I am removing this icon dynamically from javascript by using below code:
success: function(){
//other code//
saveparents.parent().parent().find('a.icon-ok').remove();
//other code//
}
icon is getting removed but tooltip "Save" is still displayed on UI. When I refresh the page, it disappears. But I want it to remove as soon as icon-ok gets removed.
Also I debugged in firebug and found that a div class for tooltip is being created in html page
<html><body>
<div ...................>... </div>
<div class="tooltip fade top in" style="top: 156.5px; left: 256.667px; display: block;">
<div class="tooltip-arrow"></div>
<div class="tooltip-inner">Save</div>
</div>
</body></html>
From firebug I can remove this div by right clicking on deletenode. It successfully removes from UI as well. So I think if I do this using javascript code, it should be removed.
But I don't know what code to put in success function to delete that div class tooltip fade top in. I need help here.