该段js代码可实现 popover 下鼠标移入移除时显示、隐藏 popover 提示信息功能
rush:xhtml;">
var strContent = '
'+
'
';
$( 'li#user_avatar' ).popover({
trigger:'manual',placement:'bottom',html:true,container:'#bs-example-navbar-collapse-1',content:strContent,}).on( 'mouseenter',function(){
var _this = this;
$(this).popover( 'show' );
$(this).siblings( '.popover' ).on( 'mouseleave',function () {
$(_this).popover( 'hide' );
});
}).on( 'mouseleave',function(){
var _this = this;
setTimeout(function () {
if (!$( '.popover:hover' ).length) {
$(_this).popover( 'hide' )
}
},100);
});
标题'+
'
'+
'张三
管理员'+ '以上这篇Bootstrap popover 实现鼠标移入移除显示隐藏功能方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持编程之家。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。