[jQuery] Re: Event does not trigger after $("asdfasdf").insertBefore($(this).parent());

2008-08-19 Thread Tahir
Thanks for your help and Interest. I think it is not problem like time controlling. because $("div#add_comments").click does not care of loading of insertBefore();. Actually I am clicking on a button which is inserted by insertBefore() and then it perform onClick. if you see this url: http://

[jQuery] Re: Event does not trigger after $("asdfasdf").insertBefore($(this).parent());

2008-08-19 Thread Olivier Percebois-Garve
have look at http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F Probably your code runs first $("div#add_comments").click( ... then it insert the new html. So when $("div#add_comments").click runs, there is nothing to be bound. Then the