Skip to main content

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

Current License: CC BY-SA 3.0

3 events
when toggle format what by license comment
Jan 16, 2023 at 2:44 comment added nnnnnn @VitaliyTerziev - Using a delegated handler (option 2) will be faster at the time you call .on(), because it only selects one element and binds one handler. Performance actually running the handler at the time the event occurs is not likely to be different enough for the user to notice the difference.
Jan 14, 2023 at 16:05 comment added Vitaliy Terziev would there be any noticeable difference performance wise, say put change listener to 20 elements or just on their parent and get ti with target after, just wondering (I know 20 is crazy small number, maybe 2000 idk
Nov 13, 2011 at 11:03 history answered nnnnnn CC BY-SA 3.0