allow to easily setup tooltips for specific elements that jQueryUI doesn’t detect automatically.

Also add workaround in case tooltips linger.
This commit is contained in:
Stefan Breunig 2013-02-18 11:10:35 +01:00
parent 014d58f09f
commit 4eb90976e3

View File

@ -190,8 +190,9 @@ window.setupSidebarToggle = function() {
}); });
} }
window.setupTooltips = function() { window.setupTooltips = function(element) {
$(document).tooltip({ element = element || $(document);
element.tooltip({
// disable show/hide animation // disable show/hide animation
show: { effect: "hide", duration: 0 } , show: { effect: "hide", duration: 0 } ,
hide: false, hide: false,
@ -233,6 +234,11 @@ window.setupTooltips = function() {
return tooltip; return tooltip;
} }
}); });
if(!window.tooltipClearerHasBeenSetup) {
window.tooltipClearerHasBeenSetup = true;
$(document).on('click', '.ui-tooltip', function() { $(this).remove(); });
}
} }