Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 5
    what about the performance issue pointed out my @andreister ?
    – rubo77
    Commented Oct 14, 2015 at 7:11
  • @rubo77 negligible at best. We're taking single-figure milliseconds. Commented Mar 23, 2016 at 9:12
  • 1
    @RoryMcCrossan that's a big deal for me though - I am looking for this because i have up to 3000 questions on a page that need events. One milisec each makes my page take 3 seconds longer to perform. Your comment isn't helpful for big lists.
    – Randy
    Commented Mar 24, 2016 at 9:39
  • 13
    The bigger issue is why you have 3000 questions on a page. If you follow good UI patterns you should never have that much information on a page. Look into paging, or lazy loading. Even using event delegation to have a single event handler for all those elements would be better. Commented Mar 24, 2016 at 10:03
  • 6
    @rubo77 - The performance gain is only seen when using event delegation by passing a selector parameter. If you call .on() without a selector parameter there is no performance improvement over using .click().
    – gilly3
    Commented Mar 24, 2016 at 18:07