| Issue 386: | trouble with ajax loaded content | |
| 3 people starred this issue and may be notified of changes. | Back to list |
|
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.
Apr 16, 2010
(No comment was entered for this change.)
Status:
Fixed
|
||||||||
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.