Is jQuery Still Relevant?

by Staff Coder

on January 6, 2018

Is jQuery Still Relevant?

The purpose of jQuery is to make it much easier to use JavaScript on your website. It simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

Junior developers will find it very easy to start using jQuery to manipulate the DOM. It is especially popular among amateur web developers and junior front-end coders. These software developers find that jQuery API provides an elegant and intuitive way to work with the DOM. For many coders, at various levels, jQuery provides a platform to normalize the DOM. Write the code once and let jQuery figure out the nuances of the different browsers for us. jQuery makes it easy to locate your DOM elements, filter what you need, inspect the DOM, manipulate it, and add behavior to the elements.

One of the cons against jQuery is that some developers are actually shielded from correctly learning and understanding JavaScript by using many of the convenience methods provided by the framework. One such example is changing the text in a Document Object Model node.

<p id="textelement">I am a text element</p>
JavaScript code:  
document.getElementById("textelement").innerHTML = "New text inside the text element!";
jQuery code:  
$('#textelement').text('New text inside the text element!');

I find jQuery particularly useful when building prototypes, especially when paired with Bootstrap or a Bootstrap theme template. None the less, jQuery is suited for any type of app because of its general purpose nature and as such can be used everywhere or a wide variety of devices and platform. Nowadays, it best suited to add behavior to web site rather than web apps. Web applications tend to be a bit more complex with ever increasing functionality and features. As such, it needs to be built with a high degree of separation of layers and components and a well thought out architecture.

Compress JavasScript files and your jQuery files with this coding web tool.