views:

18

answers:

1

I have a table where I add, remove and resort rows from time to time. They contain two dynamic "things": The row itself need a mouseenter and mouseleave event for a hover effect, and a couple of buttons need a click event attached.

What are some arguments for choosing between the jquery.live method and attaching the events when creating the rows? I am pretty sure both ways of doing it has their positive and negative sides, but what are those? And are some kinds of events better suited for one than the other? Should I add some events in the regular manner and some in the live manner?

A: 

use delegate

ncs
After reading http://stackoverflow.com/questions/2954932/#answer-2954951, I came to the same conclusion in my case.
Svish