1

示例:http: //jsfiddle.net/eduardojribeiro/fScua/297/

<a class='btn btn-danger button' rel="popover">Click Here</a>

$('body').popover({
    selector: '[rel=popover]',
    trigger: "hover",
    container: "body",
    title: "Lorem ipsum dolor",
    content: "Phasellus lobortis, tortor iaculis viverra bibendum, est nunc lobortis justo"
});

$('.button').click(function(){ $(this).remove() });
4

2 回答 2

0

你可以onclick用你的按钮点击,它会隐藏popover. 喜欢:

 <a class='btn btn-danger button' rel="popover"
 onclick="$('.popover').hide()">Click Here</a>
于 2014-02-06T10:54:06.190 回答
0

您必须使用该selector属性来销毁/隐藏弹出框:http: //jsfiddle.net/fScua/363/

$('.button').click(function(){ 
    $('[rel=popover]').popover('destroy');
    $(this).remove() ;

});
于 2014-02-06T10:50:38.113 回答