Problem loading js content with ajax

Posted by Justin Goodman on Stack Overflow See other posts from Stack Overflow or by Justin Goodman
Published on 2010-06-05T06:42:13Z Indexed on 2010/06/05 6:52 UTC
Read the original article Hit count: 194

Filed under:
|
|
|

I have a page that loads content into a single div via a script in the page. It works fine but the problem is that I have a lightbox in one of the dynamically loaded pages that only works the first time you navigate to it (the script I got for the page loading is found here). Once you navigate to another area, then back again, the lightbox fails to work and instead just loads the plain image. It's been suggested that the easiest way to fix this would be to have a script unload the js and css that is loaded in with the page, then reload it when you go back to the gallery section. I'm a designer, not a developer though, so I don't know if this is true or not. Any help is really appreciated. The page can be found here: justgooddesign.net/graduation/

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery