event-delegation

jquery undelegate click event after event has completed

Hi, I have a click event that animates in some AJAX content onto a page. Once this content has been revealed and a user clicks the same link that activated the process i now want to reverse the process and close the currently open fly out content. At the moment the currently open fly out is closed either by clicking a 'close' link o...

How many elements does it take for event delegation to become worthwhile?

Reading another SO question about jQuery performance, I started thinking about the point when it becomes worth using event delegation rather than binding to elements individually. I was thinking mainly about jQuery, but I suppose it is probably applicable for Javascript in general. Event delegation has two main purposes: allowing han...