Javascript 引导popover中的preventDefault
我正在使用twitter bootstrap,我有以下代码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(); } });
$('.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如果你回答你的问题,并在答案中加入你的解决方案,这将对其他人有所帮助。谢谢。我已经回答了这个问题