unstale

npm / jquery

jquery

What changed in jquery 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

24 breaking1 security2 deprecations3 new APIs and options6 behavior and defaults15 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

jquery 451 changes

Breaking changes 24

  • Attribute values are no longer stringified in the setter.

    4.0.0release notes

  • Setting a non-ARIA attribute to false removes that attribute.

    4.0.0release notes

  • Support is dropped for IE below 11, iOS below 11, Firefox below 65, Android Browser, and PhantomJS.

    4.0.0release notes

  • The response content-type header, when present, overwrites s.contentType.

    4.0.0release notes

  • Whitespace surrounding CSS Custom Properties values is trimmed; whitespace-only values return undefined.

    4.0.0release notes

  • jQuery no longer automatically adds px to properties, with a few exceptions.

    4.0.0release notes

  • Deprecated jQuery APIs are removed.

    4.0.0release notes

  • Support for Edge Legacy, meaning non-Chromium Microsoft Edge, is dropped.

    4.0.0release notes

  • The project migrates from AMD to ES modules.

    4.0.0release notes

  • The event.which shim was removed.

    4.0.0release notes

  • jQuery stops shimming focusin and focusout events.

    4.0.0release notes

  • getStackHook is renamed to getErrorHook.

    4.0.0release notes

  • Removed jQuery.event.global.

    4.0.0release notes

  • Removed jQuery.fx.interval; developers can no longer configure the animation timer interval through this property.

    4.0.0release notes

  • jQuery.htmlPrefilter is now an identity function, so HTML passed through it is no longer rewritten.

    4.0.0release notes

  • jQuery.trim is deprecated and removed.

    4.0.0release notes

  • Automatic promotion of JSON requests to JSONP is removed.

    4.0.0release notes

  • Support for legacy selector pseudos was dropped.

    4.0.0release notes

  • offsetHeight(true) and related measurements include negative margins.

    4.0.0release notes

  • The opacity CSS hook is removed.

    4.0.0release notes

  • Scripts are not automatically executed unless dataType is provided, and scripts are not executed for unsuccessful HTTP responses.

    4.0.0release notes

  • Callbacks and deferred modules are excluded from the slim build.

    4.0.0release notes

  • The toggleClass(boolean|undefined) signature is removed.

    4.0.0release notes

  • Implemented uniqueSort as a chainable method.

    4.0.0release notes

Security 1

Deprecations 2

  • AJAX event aliases are deprecated.

    4.0.0release notes

  • jQuery.expr.filters and jQuery.expr[":" ] are properly deprecated.

    4.0.0release notes

New APIs and options 3

  • .even() and .odd() are implemented as replacements for the POS :even and :odd selectors.

    4.0.0release notes

  • globalEval gains a doc parameter, and iframe scripts execute in their own context.

    4.0.0release notes

  • The script transport supports headers for cross-domain requests.

    4.0.0release notes

Behavior and default changes 6

  • The beforeunload event now uses .preventDefault().

    4.0.0release notes

  • Ajax supports binary data, including FormData.

    4.0.0release notes

  • Re-exposed jQuery.find.tokenize, jQuery.find.select, jQuery.find.compile, and jQuery.find.setDocument.

    4.0.0release notes

  • JSONP error script responses are executed.

    4.0.0release notes

  • Ajax requests can use processData: true even for binary data.

    4.0.0release notes

  • The show, hide, and toggle methods are included in the jQuery slim build.

    4.0.0release notes

Fixes and other changes 15

  • Falsy values in addClass(array) are skipped.

    4.0.0release notes

  • Fixed contents() on <object> elements with children, including in IE.

    4.0.0release notes

  • Calling $el.html(selfRemovingScript) is supported.

    4.0.0release notes

  • Cleanup no longer skips elements.

    4.0.0release notes

  • jQuery.Deferred.exceptionHook respects source maps.

    4.0.0release notes

  • A null value is accepted as a success function.

    4.0.0release notes

  • jQuery.isXMLDoc accepts falsy input.

    4.0.0release notes

  • A regression affecting jQuery.text() on HTMLDocument objects is fixed.

    4.0.0release notes

  • Selectors with leading combinators use qSA again.

    4.0.0release notes

  • Data and event manipulation prevent collisions with Object.prototype.

    4.0.0release notes

  • responseJSON works for erroneous same-domain JSONP requests.

    4.0.0release notes

  • DOM manipulation now respects the crossorigin attribute on scripts.

    4.0.0release notes

  • Selector lists work with qSA again.

    4.0.0release notes

  • Dimensions of table col elements are fixed.

    4.0.0release notes

  • Triggering focus, blur, or click now works with native handlers.

    4.0.0release notes