Tech 4 min read

jQuery 4.0 is out: a catch-up guide for people who stopped at 1.x

IkesanContents

jQuery 4.0 was released on January 17, 2026. It is a major update that arrives right around the 20th anniversary of jQuery itself.

I have vivid memories of the rough 1.x to 2.x migration, and after that I mostly stopped using jQuery. I knew 3.x existed, but I had not kept up with the details. Since 4.0 is out now, this seemed like a good time to summarize what changed in 3.x and what changed again in 4.0.

jQuery Version History

VersionPeriodKey characteristics
1.x2006-2012Peak era, supported IE6-8
2.x2013-2016Dropped support for IE8 and older
3.x2016-2023Promise compatibility, strong backward compatibility focus
4.x2026-Shift toward modernization

The biggest pain point in the 1.x to 2.x transition was losing support for IE8 and older. Back then many environments still could not drop IE8, so it was common to maintain 1.x and 2.x in parallel.

What Changed in 3.x?

If you skipped 3.x entirely, these are the main points.

Deferred/Promise became Promises/A+ compatible

In jQuery 3.0, Deferred objects became compatible with Promises/A+ and ES2015 Promises. The behavior of .then() changed quite a bit.

// jQuery 2.x: the error propagates upward and stops execution
// jQuery 3.x: the error becomes a reject value and the chain continues
deferred.then(function() {
  throw new Error("error");
}).then(null, function(err) {
  console.log("Caught:", err); // This runs in 3.x
});

The .catch() method was also added.

Event aliases were removed

.load(), .unload(), and .error() were removed. The API was unified around .on().

// Before 3.x
$("img").load(function() { ... });

// 3.x and later
$("img").on("load", function() { ... });

requestAnimationFrame was adopted

Animations now use requestAnimationFrame, which improves smoothness and can reduce battery usage.

The Slim build appeared

A Slim build was added that excludes AJAX, Effects, and deprecated code. The full build is roughly 30 KB gzipped, while the Slim build is about 24 KB.

XSS fix in 3.5.0

In 3.5.0, htmlPrefilter was changed to fix an XSS vulnerability. If you insert user input into HTML directly, it is still a good idea to sanitize it with something like DOMPurify.

Main Changes in 4.0

In 4.0, the project direction shifts from prioritizing backward compatibility to prioritizing modernization.

Reduced browser support

  • IE 10 and older: no longer supported
  • IE 11: still supported for now, but scheduled to be dropped in jQuery 5.0
  • Edge Legacy (non-Chromium): no longer supported
  • Android Browser: no longer supported

If you still need IE 11, you can use 4.0 for now. But since it is planned to be dropped in 5.0, long-term support for IE 11 probably means reconsidering whether jQuery is the right foundation at all.

Removed APIs

Utility APIs that now have direct equivalents in native JavaScript were removed.

Removed APIReplacement
$.trim()String.prototype.trim()
$.isArray()Array.isArray()
$.parseJSON()JSON.parse()
$.now()Date.now()
$.isNumeric()Check natively
$.isFunction()typeof fn === 'function'
// Before 4.0
const trimmed = $.trim("  hello  ");
if ($.isArray(data)) { ... }

// 4.0 and later
const trimmed = "  hello  ".trim();
if (Array.isArray(data)) { ... }

Array methods on jQuery objects such as push, sort, and splice were also removed.

Trusted Types support

jQuery now supports the Content Security Policy directive require-trusted-types-for, which makes it easier to use in stricter security environments.

ES Modules support

The source code moved from AMD to ES Modules. That makes it a better fit for modern bundlers such as Vite, Webpack 5, and Rollup.

Focus/blur event order changed

The firing order for focus events was updated to match the W3C standard.

// Before 4.0: focusout -> blur -> focusin -> focus
// In 4.0: blur -> focusout -> focus -> focusin (W3C-compliant)

If your code depends on the old event order, you will need to adjust it.

How Should You Migrate?

The jQuery Migrate plugin can temporarily restore removed APIs so you can move in stages.

<script src="https://code.jquery.com/jquery-4.0.0.js"></script>
<script src="https://code.jquery.com/jquery-migrate-4.0.1.js"></script>

If you use the development build of Migrate, it will show warnings in the console. The usual flow is to eliminate those warnings one by one, then remove the Migrate plugin after the warnings are gone.

If you are migrating from 1.x, the recommended path is to move to 3.x with Migrate 3.x first, and then move to 4.0.


Realistically, almost no new project in 2026 will choose jQuery from scratch. In many cases, React, Vue, Svelte, or plain JavaScript are enough.

But if you are maintaining an existing jQuery project, or you work in an environment like WordPress where jQuery is built in, 4.0 is worth evaluating. If you can finally drop IE10 and older, you get both performance improvements and security benefits.