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