我在 Concrete5 中使用 Vodkabears 的 Remodal,我正在尝试通过 href 将页面加载到模态中。第一次打开很好,但是关闭后就不会再打开了。我已经得出结论,问题出在“.load(href)”上,但无法找到解决方案。这是我单击 div 时的 jquery:
$(".floor-plan").click(function(event){
event.preventDefault();
var href = $(this).children('a').attr('href');
$("[data-remodal-id='modal']").load(href);
$("[data-remodal-target='modal']").click();
});
这是html:
<a href="#" data-remodal-target="modal" style="display: block;"></a>
<div class="remodal" data-remodal-id="modal">
</div>