Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 引导popover中的preventDefault_Javascript_Jquery_Html_Twitter Bootstrap - Fatal编程技术网

Javascript 引导popover中的preventDefault

Javascript 引导popover中的preventDefault,javascript,jquery,html,twitter-bootstrap,Javascript,Jquery,Html,Twitter Bootstrap,我正在使用twitter bootstrap,我有以下代码 $('.addYT').on('click', function(event) { var $this = $(this); event.preventDefault(); }).popover({ placement: 'bottom', html: true, content: function(e) { return $('.YTadd').html(); } });

我正在使用twitter bootstrap,我有以下代码

$('.addYT').on('click', function(event) {
    var $this = $(this);
    event.preventDefault();
}).popover({
    placement: 'bottom',
    html: true,
    content: function(e) {
        return $('.YTadd').html();
    }
});​

一切正常,但在
弹出窗口内容中:
有一个类似
的html代码。我希望它是默认的。但它不起作用。有人知道怎么做吗?

'true'
是一个字符串,如果你想传递一个布尔值,你应该删除引号。但这并不能解决我的问题:不管怎样,我解决了这个问题already@Chanckjh如果你回答你的问题,并在答案中加入你的解决方案,这将对其他人有所帮助。谢谢。我已经回答了这个问题