【发布时间】:2018-10-09 02:04:11
【问题描述】:
我在链接上有一个弹出框,通过 JavaScript 初始化。在弹出框本身中,有一个调用函数的链接。但是当点击弹出框内的链接时,什么也没有发生。任何想法?我找不到关于这个的答案。
链接和弹出框内容:
<a tabindex="0" href="#" role="button" class="remove-item-toggle">Remove</a>
<div id="remove-item-content" style="display: none;">
<a href="#" class="remove-item">Confirm remove</a>
</div>
JavaScript:
$('.remove-item-toggle').popover({
toggle: 'popover',
trigger: 'click',
html: true,
placement: 'top',
content: $('#remove-item-content').html(),
});
$('.remove-item').on('click', function () {
// ---- nothing happens here, it's not fired ----
});
【问题讨论】:
标签: jquery twitter-bootstrap bootstrap-4 popover