3 ms·
Even the information on that page is quite dated now, as IE becomes less relevant. As others have said, some of its examples were ironically pretty good adverts
by Silhouette 7y ago
Even the information on that page is quite dated now, as IE becomes less relevant. As others have said, some of its examples were ironically pretty good adverts for jQuery at the time it was first published.
However, you hardly ever need to use an XMLHttpRequest any more, and the native Fetch API is already as simple as jQuery's interface for most day-to-day tasks. The only major browser that doesn't support Fetch is IE, and if you still need to support IE for now, you might be better off with a simple polyfill for the standard Fetch API rather than coding around jQuery.
Similarly, there is no need for monstrosities like calling Array.prototype.forEach.call on a NodeList returned by querySelectorAll instead of jQuery's $.each any more. Again, everything except IE supports forEach directly on a NodeList, and if you still need IE support, you can use a simple polyfill. If you need a real array to work with, an ES6 spread operator will build this for you with something like [...document.querySelectorAll('.someClass')] since the NodeList is iterable these days too.