jQuery 4 FINALLY released... (What!?) ![rw-book-cover](https://img.youtube.com/vi/HNp8naNxS0w/maxresdefault.jpg) jQuery 4 is finally here. And no, don't worry, you haven't traveled back in time. This is just our first major version update since 2016. It's been in beta for 2 years, and it comes 20 years after jQuery was first introduced. And it might surprise you to learn that jQuery is still pretty important. 88% of all websites still use it, thanks mostly probably to WordPress. But you can also see there's still some pretty big names that are running it, too. I mean, if it ain't broke, don't fix it. Except this update might actually break some things as they've used this one to make all of the breaking changes they've wanted to make for years, including trimming legacy code, removing deprecated APIs and never documented functions, and just a whole host of bug fixes. So, let's just dive right in, take a look at the key changes, and just how far J Career has come in 20 years. For the first big change, Paul went out for Internet Explorer 10 and below. Support for this has now been dropped, but don't panic if you're watching this on Internet Explorer 11. Support for that won't be dropped until jQuery 5. So, you still have some time to hit that subscribe button. Alongside this, they also drop support for Edge Legacy, iOS versions earlier than the last three, Firefox versions earlier than the last two and also Android browser. So, you can see we are really modernizing now. In fact, the next three changes are all about that. So, moving on to change number two now. Migrating the jQuery source code from AMD to ES modules. So, it should now play nicely with V, Webpack, and modern build systems with no tricks required. So, why not give it a go and install it in your next project just for a little bit of fun or maybe for some nostalgia. And talking of nostalgia, this update will actually show you just how far JavaScript has come because for change number three, they've removed a bunch of jQuery functions because JavaScript has just caught up. They include things like is array, pass, JSON, trim, now is numeric is function, and loads loads more. You can now do pretty much all of these in JavaScript. itself without the need for an additional library. I mean, it's kind of crazy that we need an additional library to do some of these in the first place, but that's the way that languages have to evolve. And talking of evolving, browsers also evolve as well. So, for change number four, the last big one of the modernization updates, they finally fixed focus order. If you didn't know, for years, browsers didn't actually agree on an order of focus and blur events. So, jQuery had its own definition so it would be consistent across all of them. But now since they're deprecating the old browsers, all supported browsers except Internet Explorer have the exact same order. So jQuery is no longer going to override the native behavior. You can really see the team focused on making jQuery modern here as much of what made jQuery useful in the past has just been added to JavaScript eventually. Anyways, there is still a few things in jQuery that can be modernized, like that deferreds and callbacks which can be replaced with promises unless you're on Internet Explorer 11. or there's some animations that people do with jQuery that are now pretty easy to do in CSS. So, if you do want to take it one step further, they've actually made that slim build strip out a load of these extra modules, making it just 19.5 kilobytes. And I actually think this is quite a good approach to still offer those functions in the full package for those that might need them, but then offer a slim build that doesn't have any of the extras that are unneeded these days. So, that's it for the key headline changes, but obviously there's been a ton of bug fixes and minor tweaks, some of them dating back years. The oldest I could find was from 2014 and it related to jQuery autopromoting JSON to JSON P which has now been fixed. And there's even an issue from 2015 which I actually remember running into where jQuery CSS setter would automatically append pixels to any number that didn't specify a unit. This too has now been fixed. There's loads more that you can go and explore yourself in there. There's even some casual fixes like fixing typos, but obviously these would take a while to cover in this video. And personally, I just wanted to take a look at jQuery, see how far it's come, as it's such an awesome piece of web development history. And perhaps it's even rude to say history when it's still so actively used and maintained. Now, obviously, I wouldn't go and use jQuery today instead of React or whatever modern framework, but it just serves as a reminder that the web is built on layers of technology, and sometimes the boring, simple, and old tools are actually the ones holding the web together, especially those important legacy apps that no one dares to update. So, I'm curious to those of you still here, did you use jQuery or do you still use it? Let me know in the comments below. While you're there, subscribe. And as always, see you in the next one., jQuery 4 FINALLY released... (What!?), YouTube, 01kfrkgq6da43d37ae2j9y412k.