Your Source for Web Development Resources

Your Source for Web Development Resources

jQuery – The Difference Between Live() and Delegate()

jQuery - The Difference Between Live() and Delegate()

jQuery - The Difference Between Live() and Delegate()

In the previous choice about commonly confused bits of jQuery there is a great section about live(), die() and delegate() that may leave some asking why not just drop live() for delegate()? This choice does a great job at explaining the difference between live() and delegate().

jQuery - The Difference Between Live() and Delegate(), 8.0 out of 10 based on 1 rating

Choose It

VN:F [1.9.3_1094]
Rating: 8.0/10 (1 vote cast)

1 Comment

  1. Good!
    Because live() is just so damn friendly a lot of people will likely continue to use it.
    But if they’re starting to look at performance, the gains that are available by using delegate() instead are enormous. So from a performance standpoint, it’s best to use delegate.
    For those that dig this stuff… if you read up on event delegation and learn how it works, this whole discussion becomes a lot more clear.

Leave a Response

Please note: comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.