Javascript Ajax loaded event?
jfriend
Registered Users Posts: 8,097 Major grins
I'm trying to add some Javascript to my customizations that will modify some things on a gallery page. If I hook the body onLoad event and run my JS there, I find that the Ajaxified page isn't there yet (there are no gallery images in the DOM yet). Is there an event that I can hook into so my JS gets called after the Ajaxified page is created?
--John
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
0
Comments
OK, I found that I can subscribe to onPhotoShow and get notified everytime a new image is displayed, but unfortunately the page is not fully formed when onPhotoShow is called. Apparently, some of the navigation elements are not updated until after onPhotoShow is called. For example, the function drawPhotoNav which creates a few of the navigation elements is called after onPhotoShow. This is messing up what I'm trying to do.
Is there any straightforward way to get notified each time a new image is displayed after the page is fully formed (e.g. when Smugmug JS code is done modifying the DOM)?
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question