why magnific popup ajax box closes if clicked on content

扶醉桌前 提交于 2019-12-03 05:52:49

This is the old thread but for all the future readers: to fix this, there has to be only one root element in the html that comes out from the ajax call:

As per documentation:

http://dimsemenov.com/plugins/magnific-popup/documentation.html#ajax_type

So in your ajax call you should return something like this:

<div>    
    ...your html content 
</div>

and your popup will no longer close itself on content click.

I had the same problem, solved it by using:

modal:true,

instead of:

closeOnContentClick: false,

I solved the problem removing HTML and BODY tags in result.php.

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