Another is to bind your click handler to the table. See here for more: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F
- Richard On Mon, Jul 7, 2008 at 7:04 AM, Alexandre Plennevaux <[EMAIL PROTECTED]> wrote: > > On Mon, Jul 7, 2008 at 11:21 AM, mattithjah <[EMAIL PROTECTED]> > wrote: > > > > i load several tables contents via AJAX. after each load, i do > > bind("click", function(){ ... }). this should bind it to all matching > > elements of the DOM. but, in all browsers, it does apply only to newly > > loaded parts, the others seem to be "disabled" somehow. > > > > this is the real code inside function renewEvents(), called after each > > AJAX success: > > > > $("tr.basic").unbind("click"); > > $("tr.basic").bind("click", function(){ > > $(this).next().toggleClass("hidden"); > > }); > > > > > use livequery instead and bound once and for all your event, instead > of unbind/binding all the time: > http://brandonaaron.net/docs/livequery/ > > > > > -- > Alexandre >