Is there an event when comments are done being loaded?
jfriend
Registered Users Posts: 8,097 Major grins
A customer has asked for some javascript that would modify text in some comment headers, but the comments are dynamically loaded so I need some sort of event when the comments are done loading so I can fire the script. Are there any events when comments are done loading? If not, can there be one added?
FYI, all dynamically added things in the page should have an event so JS can be triggered then. It would be one or two lines of code for each item and would massively enable and simplify certain types of JS customizations. This includes comments, lightbox, photobar, all buttons inserted via JS, etc... It would not be hard to just make a contract that every dynamically added thing in the page would fire an event with the object name when it was done being created.
FYI, all dynamically added things in the page should have an event so JS can be triggered then. It would be one or two lines of code for each item and would massively enable and simplify certain types of JS customizations. This includes comments, lightbox, photobar, all buttons inserted via JS, etc... It would not be hard to just make a contract that every dynamically added thing in the page would fire an event with the object name when it was done being 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
yes, it would be nice to have more custom events that JS could subscribe to.
Have you tried ?
Cheers,
David
SmugMug API Developer
My Photos
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question