Issue 394: Manual call for Gallery Img 1
Status:  Fixed
Owner: ----
Closed:  Dec 2009
Reported by emeraldi...@gmail.com, Dec 10, 2009
What would a manual call look like that automatically opens a modal
containing a series of images? For example, I would like to see the same
effect that results from clicking on "Gallery Img 1" from the demo page
(http://nyromodal.nyrodev.com/) appear at page load without having to click.

Right now I'm working with this code:

$(function() {
  $.nyroModalManual({
    url: 'your URL'
  });
});

I've entered these values for the url so far with no success:

'http://www.yourdomain.com' (opens the webpage itself in the modal)
'image.jpg' (opens a static image in the modal)

I suppose I'd like to know what url and parameters to enter in order for
the image and navigation buttons to appear. 

I'm using nyroModal v1.5.5, viewed in Firefox on a Mac.

This is a great plugin, thanks.
Dec 10, 2009
Project Member #1 nyro...@gmail.com
To do that, you simply need 2 things :
- Create your HTML link with class="nyroModal" and rel="something"
- Trigger the click event on the image you want to open on the load page.

The javascript code might look like:
$(function() {
  $('rel=something').first().click();
});

Please let me know if it did the trick.
Dec 10, 2009
Project Member #2 nyro...@gmail.com
Actually, the code should be:
$('a[rel=something]:first').click();

Dec 11, 2009
#3 emeraldi...@gmail.com
Perfect! It works. Thank you!
Dec 11, 2009
Project Member #4 nyro...@gmail.com
(No comment was entered for this change.)
Status: Fixed