是否可以将多个模态附加到同一页面上的单独按钮?我遇到的问题是,当我点击其中一个按钮时,两个模态都会弹出。这些模态中有形式,这就是我将它们设置为不可关闭的原因。
主要HTML代码:
<table class="ui violet compact celled table">
.
.
.
<tfoot class="full-width">
<tr>
<th colspan="5">
<div class="ui right floated small primary labeled icon billboard button">
<i class="plus icon"></i> Add Slide
</div>
<div class="ui right floated small primary labeled icon button">
<i class="minus icon"></i> Delete Slide(s)
</div>
</th>
</tr>
</tfoot>
</table>
<table class="ui violet compact celled table">
.
.
.
<tfoot class="full-width">
<tr>
<th colspan="4">
<div class="ui right floated small primary labeled icon campaign button">
<i class="plus icon"></i> Add Slide
</div>
<div class="ui right floated small primary labeled icon button">
<i class="minus icon"></i> Delete Slide(s)
</div>
</th>
</tr>
</tfoot>
</table>
MODAL HTML:
<div class="ui standard billboard modal" style="margin-top: -197.5px; display: block !important;">
.
.
.
</div>
<div class="ui standard campaign modal" style="margin-top: -197.5px; display: block !important;">
.
.
.
</div>
MODAL JS:
$('.billboard.modal')
.modal({
closable : false
})
.modal('attach events', '.billboard.button', 'show')
;
$('.campaign.modal')
.modal({
closable : false
})
.modal('attach events', '.campaign.button', 'show')
;
答案 0 :(得分:2)
我相信我找到了答案。在模态的课程中,我刚刚添加了“过渡隐藏的”#39;这似乎解决了这个问题。