I recently saw a post on Facebook or LinkedIn with a question about whether a developer should spend any time learning jQuery or not. I have really mixed feelings regarding whether somebody should learn jQuery now other than for doing maintenance.
I probably wouldn’t spend the time on learning jQuery at this point, I think that single page apps (SPA) has reduced a lot of the need for jQuery.
That being said, there’s a lot of legacy code out there and that will need maintenance for at least the next three – five years. Most of the major websites on the internet are loading jQuery for something and there’s thousands of different plugins that are available.
Is jQuery dead?
jQuery has lost its unique edge since being released in 2016 by John Resig. jQuery really offered a great consistent and reliable API that was easy to use for DOM manipulation, animation, and AJAX.
Bootstrap 4 shipped with a jQuery dependency which meant that it still had to be installed in a lot of cases whether the development team actually called it or not.
Is jQuery Legacy code?
jQuery is still relevant and will be for quite a while, it’s still on at least 77% of websites according to BuiltWith. In fact, as of February 2020, it’s still on this website.
How did jQuery grow so fast?
Internet Explorer 6 and Internet Explorer 7 were really inconsistent with the rest of the browsers at the time which meant they would need their own special exceptions in the code.
Should You Still Use jQuery?
It’s really important that we choose the right tools for the job and sometimes jQuery is still the right tool for the job. WordPress for example still uses jQuery, up until recently the bootstrap framework still shipped and depended on jQuery.
You should consider and probably use jQuery if any of the following is true:
- Working with WordPress or other content management systems
- your work includes legacy web apps
- your site / app targets older browsers
- if it makes development easier and faster to ship something fast.
The website You Might Not Need jQuery offers a good list of all the functionality and how to replace it if you don’t need it.