4 ms·
Major Changes: .load, .unload, and .error, deprecated since jQuery 1.8, are no more. Use .on() to register listeners. jQuery.Deferred is now Promises/A+ compa
by vonklaus 10y ago
Major Changes:
.load, .unload, and .error, deprecated since jQuery 1.8, are no more. Use .on() to register listeners.
jQuery.Deferred is now Promises/A+ compatible
Error cases don’t silently fail
Animations now use requestAnimationFrame
Massive speedups for some jQuery custom selectors
- yread 10y agoIs anyone using custom selectors? quick googling only returns 5+ years old results
- balac 10y agoI use :input (https://api.jquery.com/input-selector/ https://api.jquery.com/input-selector/) occasionally
- klean92 10y agoI use :visible. The notes say it can increase speed 17x in certain cases.
- vonklaus 10y agoThe notes say it is computationally expensive and bad for performance. Using this selector heavily can have performance implications, as it may force the browser to re-render the page before it can determine visibility. Tracking the visibility of elements via other methods, using a class for example, can provide better performance. To be clear, it is 17x faster than it was.
- ashmud 10y agoI did at one point in time for flagging links to show a "leaving site" prompt. Now the JS simply checks any link when you click it (no more custom selector for flagging).
- arcatek 10y ago> jQuery.Deferred is now Promises/A+ compatible Finally. Our old codebase is using quite a lot of jQuery deferreds and, well, Promises/A+ clearly improved a lot of things API-wise.
- crescentfresh 10y agojQuery.Deferred was such a convoluted api for me. I polyfilled a Promises lib and felt bad having multiple libraries that on the cover said they did the same things.