相关疑难解决方法(0)

在popover的数据内容中获取HTML标记的元素

我在Bootstrap3的"popover"工作.这里我放置了如下的HTML内容,

<a href='#' class='btn' title ='Test' data-trigger='focus' data-
toggle='popover' data-html='true' id = 'testOutside' data-content='<a 
href="#" id="testInside" class="btn">Inside</a>'>Click Here </a>
Run Code Online (Sandbox Code Playgroud)

我无法引用data-content属性中存在的html元素.

如下,

$(document).ready(function(){
$('[data-toggle="popover"]').popover();

// the below is not working
$('#testInside').click(function(){
alert('Inside');
});

$('#testOutside').click(function(){
alert('Outside');
});
});
Run Code Online (Sandbox Code Playgroud)

但是引导类正在应用,在这种情况下,"btn"正在应用于锚标记.装上的jsfiddle.任何人都可以向我解释这个吗?

jquery html5 popover twitter-bootstrap bootstrap-popover

2
推荐指数
1
解决办法
1万
查看次数