0
從不同鏈接打開彈出窗口時出現問題。bootstrap popover僅從一個鏈接打開
這裏我javascript代碼:
<a href="#" id="popover" data-type="1">Link 1</a>
<a href="#" id="popover" data-type="2">Link 2</a>
酥料餅的內容:
<div id="content" class="hidden">
Contents
</div>
<div id="title" class="hidden">
Title
</div>
$("#popover").popover({
html : true,
content: function() {
var type = $(this).data("type");
alert(type);
return $("#content").html();
},
title: function() {
return $("#title").html();
}
});
,以便從他們打開酥料餅在這裏,我的兩個鏈接
我有這個問題:我只能從LINK 1打開彈出窗口,當我點擊LINK 2時什麼也沒有發生。
不知道這將是問題的原因,但有些事我注意到的是,標識必須是唯一的。 – NTL