简体   繁体   English

如何在JavaScript重定向中使用nyroModal JQuery插件

[英]How to use nyroModal JQuery plugin in javascript redirects

I'm using the nyroModal JQuery Plugin: http://nyromodal.nyrodev.com/ 我正在使用nyroModal JQuery插件: http ://nyromodal.nyrodev.com/

What I want to do is I want the page which I redirect in javascript to open in modal window. 我想要做的是我要在javascript窗口中重定向的页面在模式窗口中打开。 If you go to the link above there is an information about the usage of the plugin. 如果您转到上面的链接,则有有关插件用法的信息。 It looks simple, but I still couldn't figure it out. 看起来很简单,但我仍然无法弄清楚。

And simply, the usage of the plugin is to include nyroModal function. 简单地说,该插件的用法是包括nyroModal函数。 I tried to do this, but didn't work: 我试图这样做,但是没有用:

<script language="javascript">
document.location.nyroModal()='redirect.html';
</script>

Any ideas? 有任何想法吗?

Thanks in advance. 提前致谢。

$.nyroModalManual({
  url: 'redirect.html'
});

If you want that to happen when the page loads then wrap it in a doc ready. 如果您希望在页面加载时发生这种情况,请将其包装在文档中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM