Search code examples
javascriptjquerytwitter-bootstraptooltippreventdefault

Keep Twitter Bootstrap Tooltip open on mouseleave


For a particular case and element I need to show Bootstrap Tooltip by default (once the page is loaded) an always keep it open (even on mouseover and mouseout).

That's the code I use to open tooltip by default on the element:

$('#myelement').tooltip('show');

Now I'm not sure how to prevent/disable the default action of tooltip on mouseover & mouseout. Any idea?

Thanks in advance!


Solution

  • Solution found. Manual Trigger does the trick - here is the updated code:

    $('.taskTooltip').tooltip({trigger: 'manual'}).tooltip('show');