$.each hands the callback the index first and the value second. Array.prototype.forEach hands it the value first and the index second. Both signatures are two arguments of convenient…
Thirty-one requests before the page could do anything, most of them under 2 KB. Concatenation in a declared order, source maps, and cache busting that proxies respect.
$.ajaxSetup is the documented way to attach a CSRF token or an authentication header to every request, and it does exactly that — including requests made by jQuery…
A third-party widget arrives with jQuery 1.7 bundled into its own script tag, the application is on 1.11, and whichever loads second owns window.jQuery — so one of…
Appending 400 rows to a table one at a time makes the browser invalidate layout after each insertion, because each one changes a tree that is still being…
$.ajax takes success and error options, so most code passes callbacks in and stops there. It also returns a jqXHR, which has implemented the Deferred interface since 1.5…
Delegating to document is the version of event delegation that always works, so it becomes the default. Thirty handlers later, every click anywhere on the page walks the…