Timeline for Difference between .on('click') vs .click()
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 20, 2016 at 20:53 | history | edited | gilly3 | CC BY-SA 3.0 |
Attempting to address downvotes by clarifying what I meant by "No".
|
Mar 24, 2016 at 18:07 | comment | added | gilly3 |
@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() .
|
|
Mar 24, 2016 at 18:03 | history | edited | gilly3 | CC BY-SA 3.0 |
added 371 characters in body
|
Mar 24, 2016 at 13:00 | comment | added | gilly3 |
And how is event delegation accomplished in jQuery? With .on() .
|
|
Mar 24, 2016 at 10:03 | comment | added | Rory McCrossan | 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. | |
Mar 24, 2016 at 9:39 | comment | added | Randy | @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. | |
Mar 23, 2016 at 9:12 | comment | added | Rory McCrossan | @rubo77 negligible at best. We're taking single-figure milliseconds. | |
Oct 14, 2015 at 7:11 | comment | added | rubo77 | what about the performance issue pointed out my @andreister ? | |
Feb 3, 2012 at 0:31 | history | answered | gilly3 | CC BY-SA 3.0 |