Open iframe manually in nyroModal?(在 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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 nyroModal 中手动打开 iframe?


基础教程推荐
- 我什么时候应该在导入时使用方括号 2022-01-01
- 动态更新多个选择框 2022-01-01
- 在 JS 中获取客户端时区(不是 GMT 偏移量) 2022-01-01
- 有没有办法使用OpenLayers更改OpenStreetMap中某些要素 2022-09-06
- 在for循环中使用setTimeout 2022-01-01
- 响应更改 div 大小保持纵横比 2022-01-01
- Karma-Jasmine:如何正确监视 Modal? 2022-01-01
- 悬停时滑动输入并停留几秒钟 2022-01-01
- 角度Apollo设置WatchQuery结果为可用变量 2022-01-01
- 当用户滚动离开时如何暂停 youtube 嵌入 2022-01-01