Bootstrap's tooltip doesn't disappear after button click & mouseleave

前端 未结 22 930
感情败类
感情败类 2020-12-07 16:24

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 - Bootstra

22条回答
  •  眼角桃花
    2020-12-07 17:00

    Try using rel="tooltip" instead of data-toggle="tooltip" which worked in my case. I was using data-toggle="tooltip" and also set the trigger condition as hover which didn't work in my case. When I changed my data selector, it worked.

    HTML Code:

    
    

    JS Code //Tooltip $('.btn').tooltip({ trigger: 'hover' });

    This will definitely remove the stuck tooltip.

提交回复
热议问题