# What changed in jquery

> 51 changes in jquery 4 from its official release notes, upgrade guides and advisories: 24 breaking, 2 deprecations, 1 security, 3 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/npm/jquery/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## jquery 4

### Breaking changes

- Attribute values are no longer stringified in the setter. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Setting a non-ARIA attribute to false removes that attribute. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Support is dropped for IE below 11, iOS below 11, Firefox below 65, Android Browser, and PhantomJS. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- The response content-type header, when present, overwrites s.contentType. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Whitespace surrounding CSS Custom Properties values is trimmed; whitespace-only values return undefined. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- jQuery no longer automatically adds px to properties, with a few exceptions. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Deprecated jQuery APIs are removed. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Support for Edge Legacy, meaning non-Chromium Microsoft Edge, is dropped. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- The project migrates from AMD to ES modules. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- The event.which shim was removed. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- jQuery stops shimming focusin and focusout events. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- getStackHook is renamed to getErrorHook. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Removed jQuery.event.global. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Removed jQuery.fx.interval; developers can no longer configure the animation timer interval through this property. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- jQuery.htmlPrefilter is now an identity function, so HTML passed through it is no longer rewritten. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- jQuery.trim is deprecated and removed. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Automatic promotion of JSON requests to JSONP is removed. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Support for legacy selector pseudos was dropped. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- offsetHeight(true) and related measurements include negative margins. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- The opacity CSS hook is removed. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Scripts are not automatically executed unless dataType is provided, and scripts are not executed for unsuccessful HTTP responses. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Callbacks and deferred modules are excluded from the slim build. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- The toggleClass(boolean|undefined) signature is removed. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Implemented uniqueSort as a chainable method. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)

### Security

- Manipulation gains basic TrustedHTML support. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)

### Deprecations

- AJAX event aliases are deprecated. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- jQuery.expr.filters and jQuery.expr[":" ] are properly deprecated. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)

### New APIs and options

- .even() and .odd() are implemented as replacements for the POS :even and :odd selectors. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- globalEval gains a doc parameter, and iframe scripts execute in their own context. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- The script transport supports headers for cross-domain requests. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)

### Behavior and default changes

- The beforeunload event now uses .preventDefault(). (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Ajax supports binary data, including FormData. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Re-exposed jQuery.find.tokenize, jQuery.find.select, jQuery.find.compile, and jQuery.find.setDocument. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- JSONP error script responses are executed. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Ajax requests can use processData: true even for binary data. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- The show, hide, and toggle methods are included in the jQuery slim build. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)

### Fixes and other changes

- Falsy values in addClass(array) are skipped. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Fixed contents() on <object> elements with children, including in IE. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Calling $el.html(selfRemovingScript) is supported. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Cleanup no longer skips elements. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- jQuery.Deferred.exceptionHook respects source maps. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- A null value is accepted as a success function. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- jQuery.isXMLDoc accepts falsy input. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- A regression affecting jQuery.text() on HTMLDocument objects is fixed. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Selectors with leading combinators use qSA again. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Data and event manipulation prevent collisions with Object.prototype. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- responseJSON works for erroneous same-domain JSONP requests. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- DOM manipulation now respects the crossorigin attribute on scripts. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Selector lists work with qSA again. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Dimensions of table col elements are fixed. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
- Triggering focus, blur, or click now works with native handlers. (4.0.0) — [release notes](https://github.com/jquery/jquery/releases/tag/4.0.0)
