Internative Logo

What Is jQuery? The JavaScript Library, jQuery 4 and Migration

What Is jQuery? The JavaScript Library, jQuery 4 and Migration

In the mid-2000s, writing JavaScript for the web meant writing it several times. Each browser had its own way of selecting elements, attaching events and making background requests, and code that worked in Firefox often failed in Internet Explorer. jQuery wrapped those differences in one short, readable API and became the most widely deployed JavaScript library on the web. Browsers have since caught up, and new projects rarely start with it, but a large share of the web still runs on it, which makes knowing how to maintain and move away from jQuery a practical skill.

This article explains what jQuery is, how it works, where it still makes sense, what changed with jQuery 4.0, and how to modernise a jQuery codebase.

What is jQuery?

jQuery is an open-source JavaScript library that makes HTML document traversal and manipulation, event handling, animation and Ajax simpler, through an API that works the same way across browsers. Its motto was "write less, do more".

John Resig introduced jQuery at BarCamp in New York City on 14 January 2006, and released jQuery 1.0 on 26 August 2006. It spread quickly because it solved a daily problem with very little code, and it became a default part of content management systems, themes and UI frameworks. Today jQuery is a project of the OpenJS Foundation and is released under the MIT licence.

Its reach is still large. W3Techs' survey finds jQuery on a majority of all websites, and the jQuery team, citing the OpenJS Foundation, has estimated that about a third of the sites using it run an outdated version.

On 17 January 2026, twenty years after its introduction, the team released jQuery 4.0.0, the first major version in almost ten years. It drops support for Internet Explorer 10 and older, Edge Legacy, older iOS and Firefox versions and the old Android Browser, while keeping IE11 for now; removing IE11 is planned for jQuery 5.0. It also removes long-deprecated helpers such as jQuery.isArray, jQuery.parseJSON and jQuery.trim in favour of native equivalents, moves the source to ES modules, and adds support for Trusted Types. Sites that must still support the dropped browsers are advised to stay on jQuery 3.x.

How jQuery works

Select, then act. Almost everything starts with the $() function and a CSS-style selector. $(".menu a") returns a jQuery object wrapping every matching element, and methods called on it apply to all of them: .addClass(), .hide(), .on("click", …).

Chaining. Most methods return the same jQuery object, so operations chain: select, change a class, set text and attach a handler in one readable line.

Events. .on() attaches handlers in a consistent way across browsers, and event delegation lets one handler on a parent cover elements added to the page later.

Ajax. $.ajax() and its shortcuts load data from the server without reloading the page. Ajax, short for Asynchronous JavaScript and XML, is the technique of exchanging data in the background; today it usually means JSON over HTTP.

Plugins. Developers extend the jQuery object with their own methods. That is how a large ecosystem of sliders, date pickers, validation and UI widgets grew up, including jQuery UI.

Key features

  • CSS selector engine for finding elements with the same syntax used in stylesheets.
  • DOM manipulation: adding, removing and changing elements, attributes and classes.
  • Event handling with delegation and a consistent event model.
  • Ajax helpers for requests and responses.
  • Simple animation and effects such as fades and slides.
  • Plugin architecture that made a very large catalogue of add-ons possible.
  • A slim build without Ajax and effects for projects that only need DOM work.

Where jQuery is used

  • Content management systems and themes, where it has shipped for years as a standard dependency.
  • Older web applications and admin panels built before component frameworks became common.
  • Sites built on earlier Bootstrap versions, whose JavaScript components required jQuery until Bootstrap 5 removed the dependency.
  • Small enhancements on server-rendered pages: a toggle, a form helper, a simple Ajax call.
  • Integrations and embedded widgets that must run inside pages the team does not control.

When to choose jQuery, and when not to

Keep or use jQuery when:

  • You maintain an existing application built on it, and a rewrite would cost more than it returns.
  • The site depends on jQuery plugins that have no maintained replacement yet.
  • You are adding small behaviour to a server-rendered site that already loads jQuery.
  • You need a gradual path: upgrade jQuery first, then replace it screen by screen.

Choose something else when:

  • You are starting a new web application. Native browser APIs cover what jQuery was created for, and frameworks such as React, Vue.js or Next.js handle state and rendering in a way jQuery was never designed for.
  • The interface has a lot of state. Manually updating the DOM from many event handlers becomes hard to reason about as screens grow.
  • Page weight matters and the only use is a few selectors and a request. Plain JavaScript with querySelectorAll, classList and fetch does the same with no dependency.

The real risk is not jQuery itself but an old, unpatched version. Older releases may contain security flaws such as cross-site scripting issues fixed in later versions, so a site still on jQuery 1.x or 2.x should be upgraded even if a full migration is years away.

The jQuery team's own upgrade guidance gives a safe order. Load the jQuery Migrate plugin, which logs warnings for deprecated or changed behaviour and temporarily restores the old one, fix the warnings, then remove it. From jQuery 1.9 or later you can move to 4.x in one step. Once the library is current, screens can be moved one at a time to native JavaScript or a component framework. The same applies to sites built on Bootstrap 4 or earlier, whose JavaScript components depend on jQuery.

jQuery and its alternatives

OptionWhat it isStrengthBest fit
jQueryDOM and Ajax libraryShort syntax, huge plugin ecosystemExisting sites, light enhancements
Native JavaScript (DOM APIs, fetch)Built into every browserNo dependency, no downloadSmall interactions on any modern site
ReactComponent libraryDeclarative UI driven by stateInteractive applications
Vue.jsProgressive frameworkCan be adopted page by pageGradual migration from jQuery

The usual question is jQuery or plain JavaScript. jQuery is written in JavaScript; it is a library on top of the language, not a separate language. Modern browsers now offer native equivalents for most of what made jQuery necessary, so for new code the default is plain JavaScript, ideally written in TypeScript, with a framework when the interface demands one.

How we use jQuery at Internative

We use jQuery mainly in legacy system modernisation and integration projects. It lets us maintain and improve existing applications while keeping them stable and working across browsers, instead of forcing a risky rewrite on day one.

If you are running an application that has outgrown its jQuery front end, our product modernization team can help you plan a migration that keeps the product working throughout.

Frequently asked questions

What is jQuery and why is it used?

jQuery is a JavaScript library that makes selecting and changing page elements, handling events, animating and making Ajax requests simpler and consistent across browsers. It became popular because it removed browser differences that made plain JavaScript painful in the 2000s. Today it is mostly used in existing sites and applications.

Is jQuery a framework or a library?

A library. jQuery gives you functions to call when you need them; it does not dictate how an application is structured, manage state or render components. Frameworks such as Angular, Vue or Next.js do that.

What is the difference between JavaScript and jQuery?

JavaScript is the programming language browsers run. jQuery is a library written in JavaScript that wraps common browser tasks in a shorter API. Anything jQuery does can be done in plain JavaScript, and modern browser APIs make that much easier than it was when jQuery appeared.

Is jQuery still used?

Yes, very widely, mostly on existing sites and in content management systems. The project is active: jQuery 4.0.0 was released in January 2026. For new applications, most teams use native JavaScript or a component framework instead.

What is Ajax?

Ajax (Asynchronous JavaScript and XML) is the technique of exchanging data with a server in the background and updating part of a page without reloading it. jQuery's $.ajax() made it easy to use; today the browser's native fetch() API does the same job.

Related services

Where this topic becomes an engagement.

Keep reading

The articles that follow this one.