Liquid Fire Posted June 25, 2007 Share Posted June 25, 2007 I think this is where this question should go becuase it is mainly a javascript questyion. I have a lightbox(slimbox) to show a image gallery. when i load the page it works fine. when I laod the smae page with ajax it does not work. is there a problem with doing javascript in ajax loading content? Quote Link to comment Share on other sites More sharing options...
nogray Posted June 25, 2007 Share Posted June 25, 2007 The problem is the lightboxes out there only look at the HTML code when the page loads, so if you using AJAX to load the page, the lightbox won't know it has to look for the links, therefore not working. To fix that, look at your lightbox script and find the initiating function and find what events the script add to the links. You can call that function when the AJAX page loads as well. Quote Link to comment Share on other sites More sharing options...
Liquid Fire Posted June 25, 2007 Author Share Posted June 25, 2007 yea, I found a modified version of the lightbox that has the lightbox as a class so you can add content to it on the fly, this might work for me but i have to try it to see if it does and if not I will take a look at the code to see if i can add links somehow. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.