JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js">
// Change the 1.9.2 above to 1.9.1 to make expected behavior return
</script>
<div id="boo" onclick="
if (openAlready) {
$('#thebutton').tooltip('close');
openAlready=false;
}
else {
$('#thebutton').tooltip('open');
openAlready=true;
}
">Click me to toggle the tooltip.</div>
<h2>(Move the mouse in and out of the tooltipped object to make it disappear in jQueryUI>=1.9.2, though that really shouldn't happen.)</h2>
<div style="position:relative;height:20em;"><div id="thebutton" title="tooltip" style="position:absolute;bottom:0;">I'm tooltipped.</div></div>
JavaScript
openAlready=false;
$(document).ready(
function() {
$('#thebutton').tooltip({disabled:true});
$('#thebutton').tooltip("option","content","I'm a tip.");
$('#thebutton').tooltip.on("tooltipopen",function(event,ui) {
openAlready=true;
});
$('#thebutton').tooltip.on("tooltipclose",function(event,ui) {
openAlready=false;
});
// This kind of thing doesn't seem to work stop the tooltip from closing.
// $('#thebutton').mouseleave(function() {return false;});
}
);