Skip to main content

Timeline for Direct vs. Delegated - jQuery .on()

Current License: CC BY-SA 3.0

14 events
when toggle format what by license comment
Jan 11, 2021 at 16:21 answer added Leo timeline score: 0
Sep 11, 2017 at 21:52 comment added Jaime Montoya The "test page" you reference is not working.
S Sep 6, 2016 at 14:13 history suggested RPichioli
Better tags for the post's question
Sep 6, 2016 at 13:23 review Suggested edits
S Sep 6, 2016 at 14:13
Sep 6, 2016 at 12:54 answer added Maciej Sikora timeline score: 1
Jan 27, 2016 at 16:01 answer added Bob Stein timeline score: 3
Sep 29, 2015 at 16:42 history protected Popnoodles
Jun 19, 2015 at 21:47 comment added vipero07 @KevinWheeler I commented on your fiddle below but here, essentially it isn't set up correctly (you are binding to the parent element, and delegation is intended for the children). To answer your question moey it means that the delegated handler will match newly added elements, where the one without delegation won't. Delegation has the benefit of there being less events hooked into the browser causing lower memory consumption for the app, however the tradeoff is it increases the time to process a click (minimally). If you are making a game don't delegate.
Apr 7, 2015 at 16:25 comment added dgo For all interested: jsperf.com/jquery-fn-on-delegate-vs-direct
Apr 25, 2014 at 16:42 answer added Brynner Ferreira timeline score: 6
Nov 13, 2011 at 13:18 vote accept moey
Nov 13, 2011 at 11:22 answer added N3dst4 timeline score: 396
Nov 13, 2011 at 11:03 answer added nnnnnn timeline score: 6
Nov 13, 2011 at 10:26 history asked moey CC BY-SA 3.0