I have a problem with bootstrap's tooltip : When I click on a button, tooltip stays even if is the cursor is outside of the button. I have looked into the manual - Bootstrap's tooltip and if I'm clicking on the buttons, I see the same problem. Is there any solution to fix this? Just tried in latest FF, IE.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
You can also use below method to hide tooltip on mouseleave, As below:
This is because
trigger
is not set. The default value for trigger is'hover focus'
, thus the tooltip stay visible after a button is clicked, until another button is clicked, because the button isfocused
.So all you have to do is to define
trigger
as'hover'
only. Below the same example you have linked to without persisting tooltips after a button is clicked :the doc example in a fiddle -> http://jsfiddle.net/vdzvvg6o/