Bootstrap Popover 关闭按钮出现问题 [英] Having Issue on Bootstrap Popover Closing Button

查看:27
本文介绍了Bootstrap Popover 关闭按钮出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你能看看这个演示 并告诉我为什么我无法弹出通过添加的关闭按钮关闭弹出框后首先单击弹出框?

Can you please take a look at This Demo and let me know why I am not able to pop over the popover on First click after closing the popover through the added close button?

$(document).ready(function(){
    $('[data-toggle="popover"]').popover({
        placement : 'top',
        html : true,
        title : 'User Info <a href="#" class="close" data-dismiss="alert">×</a>',
        content : '<div class="media"><a href="#" class="pull-left"><img src="../images/avatar-tiny.jpg" class="media-object" alt="Sample Image"></a><div class="media-body"><h4 class="media-heading">Jhon Carter</h4><p>Excellent Bootstrap popover! I really love it.</p></div></div>'
    });
    $(document).on("click", ".popover .close" , function(){
        $(this).parents(".popover").popover('hide');
    });
});

如您所见,每次点击

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