.live() listens on document , where .delegate() listens on a more local element, <table> in this case.
Both of them act the same way, listening to the events bubbling up, and one before .delegate() just bubbling less than being caught.
Your example:
$("table td").live('hover', function() {});
Not the same as it attaches the event handler to document again, and not to <table> , therefore .delegate() for more local elements, more efficient in most cases ... although it still uses .live() under covers.
Also keep in mind that $(selector) retrieves items, so $("table td") selects a bunch of items for real no good reason when using .live() , where as $("table").delegate() selects only <table> elements, therefore even initially it is more efficient without starting the selector and discarding the result.
Nick craver
source share