Open iframe manually in nyroModal?

孤人 提交于 2019-11-27 04:44:00

问题


I am trying to get nyroModal to open in an iframe, directly from JavaScript.

To clarify, the following is not what I need:

$.nmManual(url); // not an iframe

because it does not open an iframe.

This will also not work:

<a href="http://someurl.com/" target="_blank" class="nyroModal">click me</a>
<script type="text/javascript"> $(".nyroModal").nyroModal(); </script>

because I really need to launch it directly from JavaScript.

I've looked through the documentation, and I can't find any obvious way to do this. Any ideas?


回答1:


$.nmManual can also be used to open an iframe, using the filters:

$.nmManual('http://someurl.com/', {
    callbacks: { 
      initFilters: function(nm) {
      nm.filters.push('link');
      nm.filters.push('iframe');
    }
  }
});


来源:https://stackoverflow.com/questions/7183591/open-iframe-manually-in-nyromodal

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