本文介紹了在 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 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?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!