问问题
4612 次
1 回答
0
<button class="popButton" id = "myPopover" rel="popover" data-toggle="popover" data-content="I'm a popover!">I do nothing!</button>
<button id = "myTrigger" data-src="#myPopover">Click me</button>
<script>
$('#myTrigger').click(function(){
$($(this).data("src")).popover('toggle');
});
$(function() {
$('.popButton').popover({
trigger: "manual",
placement: "top"
});
});
</script>
代码编辑为远程触发器
与工作小提琴 http://jsfiddle.net/vEzDp/2
于 2013-06-27T16:44:19.137 回答