Issue 386: trouble with ajax loaded content
Status:  Fixed
Owner: ----
Closed:  Apr 2010
Reported by largopre...@gmail.com, Nov 20, 2009
I'm trying to get nyroModal to recognize dynamically loaded links on my page.

I use jQuery to load in an external .php file, and put the contents in a
div on my main page. I know I need to rebind the nyroModal links at that
time, but everything I've tried doesn't work.

I put this piece of code in the body of the external .php file:

<script type="text/javascript">
$('#content .nyroModal').nyroModal();
</script>

But it doesn't work? I don't understand.


Mar 18, 2010
#1 carljoha...@gmail.com
Have you tried to use the following instead?

<script type="text/javascript">
$("selector to your content").load(function () {
  $('#content .nyroModal').nyroModal();
});
</script>

I would guess the script gets executed before it should or not at all. Another good
idea for finding the problem would be to put an alert("test"); before your statement,
just to see when the script executes.
Apr 16, 2010
Project Member #2 nyro...@gmail.com
(No comment was entered for this change.)
Status: Fixed