jQuery delegate performance on the click event on large lists - slows down if you dynamically add more elements?
问题 I have a visual list of items like this: http://jsfiddle.net/viatropos/XCe3T/1/ In the real app, I'm only loading 200 total items. But the problem is the click event takes almost one second to call the handler, even with just 200 items. The mouseover event callback executes immediately no matter how many items are in the list. My question is, shouldn't the delegate method be just as fast no matter how many elements are on the page? All I am doing is this: $("body").delegate("a", "click",