Bootstrap Popover在第一个mouseenter事件上不起作用 [英] Bootstrap popover does not work on first mouseenter event

查看:148
本文介绍了Bootstrap Popover在第一个mouseenter事件上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下代码

<a class="reply"  data-content="this is the mail" 
data-original-title="this is the title" rel="popover">this</a>

然后我触发了jquery事件,如下所示

and I triggered the jquery event as follows

$(document).on("mouseenter",".reply",function(event){
   $(this).popover({placement:'bottom'});
});

但是问题出在第一个悬停事件上,弹出窗口没有显示

But the problem is on the first hover event the popover not get showed

第二个事件的弹出窗口正常显示...这种活动的原因是什么以及如何纠正它...

from the second event popover get showed normally... What is the reason for this kind of activity and how to rectify it...

推荐答案

我找到了添加以下代码使其有效的答案

I found the answer adding the following code made it work

$(document).on("mouseenter",".reply",function(event){
  $(this).popover({placement:'bottom'});
  $(this).popover('toggle');
});

这篇关于Bootstrap Popover在第一个mouseenter事件上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆