The Future of jQuery

Posted by JGB on December 22, 2019

Recently, I have been hearing a lot of discussion about the relevance of jQuery, and if it is still important to learn jQuery. In short, I think that it is still important to learn jQuery; however, it is much less relevant than it used to be. John Resig created jQuery in 2006. It is a JavaScript library that allows for simple HTML DOM tree traversal and manipulation, event handling, and AJAX. According to Wikipedia, it is used by about 70% of websites. Old browsers were ruled by jQuery, as it made DOM manipulation and AJAX much more seamless. It used to be vital; this is before Chrome and more standardized browsers and before frameworks such as React.js. Why exactly did jQuery stat to fall in popularity? First, JavaScript, as a language itself, is more proficient in solving some of the problems that it previously relied on jQuery to solve. Second, Modern web browsers implemented JavaScript consistently (such as Chrome). Also, new and more advanced libraries and frameworks like React came out and solved the problems jQuery used to be needed to solve. jQuery has a number of pros and cons. It is great because is it fast and consistent. It does exactly what you need it to do – nothing less and nothing more. It handles events, performs animations, and allows for AJAX interactions. If you have a small static website built via word press or something then jQuery will probably be enough and you don’t need to bring in a large framework like React. CONS: with these advanced frameworks/libraries, such as React, you are able to managed complex large components in a single page application very easily and quickly primarily due to the virtual DOM. You are updating info and data on this virtual DOM,which is much easier than trying to do all of this complex work via directly interacting with the actual DOM via jQuery. Also, if you website is really just super simple, you might not even need any fancy framework or jQuery at all because JS has come so far - plain old vanilla JS will work in some cases and keep your website super light. So, jQuery is certainly becoming less relevant; however, it is still in use and very useful and you should know how to use jQuery as it is being used on a significant number of applications and websites. If you go to work for a company that is writing a completely new program, then you might be able to get away with not knowing much jQuery but if you are working with any legacy code you most certainly will need to know jQuery