在nyroModal中手动打开iframe? [英] Open iframe manually in nyroModal?

查看:123
本文介绍了在nyroModal中手动打开iframe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图让nyroModal直接从JavaScript中打开iframe。

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

因为它没有打开iframe。

because it does not open an iframe.

这也行不通:

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

因为我真的需要直接从JavaScript启动它。

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?

推荐答案

$。nmManual也可以用来打开iframe,使用过滤器:

$.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');
    }
  }
});

这篇关于在nyroModal中手动打开iframe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆