Is jQuery Still Relevant?

Photo by Greg Rakozy on Unsplash

What is jQuery?

jQuery is a JavaScript library that helps developers interact with HTML interfaces.  Its not a framework but simply a collection of functions that allow developers to interact with the DOM.  It also provides cross browser support and is easy to install.  It is well established and used on countless websites.

Why Should I Care?

Ok but its 2018 shouldn’t I just use React or Vue?

React and Vue are great tools for creating interfaces but they are not the best choice for all projects.  Sometimes you just need to add a small amount of interactivity to a site.  With jQuery you can add a script tag to your page and go.  No complex tooling required.

Modern JavaScript frameworks require a major decision.  Once you commit to building your site with React or Vue its difficult to go back.  If you change you mind you will probably have to do a complete rebuild.

This is a lot of work if all you need to do it show a modal when a button is clicked.  Plus if you do decide to move to a full JavaScript framework down the road its fairly easy to replace jQuery with your framework of choice.

Shouldn’t I Just Learn JavaScript?

Yes you should learn vanilla JavaScript DOM methods.  I always tell developers who are new to Front-end to learn JavaScript before learning any specific framework or library.  Under the hood all of these frameworks are just basic JavaScript and you should always know how something works if you are going to use it.

But reading the jQuery documentation and looking at examples is a great way to learn whats possible. If there is a way to manipulate the DOM jQuery already has the functionality.  Its a great source of inspiration.

As a coding challenge, read through the documentation and recreate jQuery’s functionality with vanilla JavaScript.  Also look over the source code. It contains a lot of comments and is well organized.

About Beth Rogers

Beth

Beth Rogers is a Web Developer and Consultant living in San Antonio Texas. With over 10 years of experience she helps businesses create beautiful, functional experiences online.

More From Beth Rogers