magnific popup modal closes on click

柔情痞子 提交于 2019-12-12 05:55:03

问题


I am trying to create a modal (won't close on 'esc' or 'click') popup with magnific popup. But for some reason, the popup closes on click or esc. I have followed examples here: http://jsfiddle.net/n6c5f/2/ and here: http://codepen.io/vemec/pen/JDsLl. Copying and pasting the exact code doesn't seem to work - the popup opens fine but closes on default events.

This is my current HTML:

<a href="#modal1" class="open-modal1">Open modal 1</a>

<div id="modal1" class="clean-modal mfp-hide">
TEST Modal popup
</div>

And JS:

jQuery('.open-modal1').magnificPopup({
type:'inline',
modal:true
});

Any thoughts?


回答1:


Updating to current version of Magnific popup solved the issue. Perhaps there was this was an issue w/ v0.8.7? Either way, resolved.



来源:https://stackoverflow.com/questions/22747814/magnific-popup-modal-closes-on-click

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!