Search code examples
javascriptjqueryjquery-pluginsnyromodal

How to use nyroModal JQuery plugin in javascript redirects


I'm using the nyroModal JQuery Plugin: http://nyromodal.nyrodev.com/

What I want to do is I want the page which I redirect in javascript to open in modal window. 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. I tried to do this, but didn't work:

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

Any ideas?

Thanks in advance.


Solution

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

    If you want that to happen when the page loads then wrap it in a doc ready.