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:
parent
014d58f09f
commit
4eb90976e3
10
code/boot.js
10
code/boot.js
@ -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(); });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user