see here: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F http://docs.jquery.com/Plugins/livequery
Essentially, you either need to deal with this in the load() success callback or use live(). However, i can't remember if live() works for the load event (the docs don't sem to spell this out). On Thu, Jan 7, 2010 at 11:33 AM, nybbblesandbytes <nybblesandbytes...@gmail.com> wrote: > jQuery group, > > I've been using jQuery for my website, and have come up against an > obstacle. My page dynamically loads comments from DISQUS, and as a > result the comments take a few seconds to load. I need to make some > jQuery code that runs a function once the comments (which are of class > dsq.comment.message) are created. I've tried using the load(fn) > event, but it doesn't seem to work for objects that have not yet been > created. In essence, I need jquery to watch for new elements of a > certain class to be created, then my code will make some mods. Any > idea how to do this or what event to watch for? > > Currently, I am running this code: > > $(".dsq-comment-message").load(function () { alert('A comment was just > created'); } ); > > ~ nybblesandbytes >