jQuery 3.7.1 has been released! This release fixes a regression from jQuery 3.6.0 that resulted in rounded dimensions for <tr />
elements in Chrome and Safari. Also, a (mostly) internal Sizzle method, jQuery.find.tokenize
that was on the jQuery object was accidentally removed when we removed Sizzle in jQuery 3.7.0. That method has been restored.
As usual, the release is available on our cdn and the npm package manager. Other third party CDNs will probably have it soon as well, but remember that we don’t control their release schedules and they will need some time. Here are the highlights for jQuery 3.7.1.
Support Test for Table Rows
jQuery 3.6.0 introduced a change to a support test to account for a sudden failure from Firefox, which started including table borders in computed dimensions for <tr />
elements. That may be actually be correct, but Firefox is the only browser doing it. However, that new support test didn’t account for pages with * { box-sizing: border-box; }
in CSS. And so, the support test failed on those pages in all browsers. The result was a fallback to use outerWidth
and outerHeight
, which unfortunately doesn’t return fractional values. The support test has now been fixed and previous behavior has been restored for Chrome and Safari, but Firefox and IE will continue to return integers.
Re-exposing Methods from Sizzle
jQuery has inlined most of the code from Sizzle in jQuery 3.7.0 in preparation for larger changes coming to the jQuery selector engine in the future. For the most part, there were no functional changes, but we did accidentally privatize a method that used to be public. While jQuery.find.tokenize
was not documented, some code relied on it being available. That method has now been restored.
Upgrading
We do not expect compatibility issues when upgrading from a jQuery 3.0+ version. To upgrade, have a look at the new 3.5 Upgrade Guide. If you haven’t yet upgraded to jQuery 3+, first have a look at the 3.0 Upgrade Guide.
The jQuery Migrate plugin will help you to identify compatibility issues in your code. Please try out this new release and let us know about any issues you experienced.
If you can’t yet upgrade to 3.5+, Daniel Ruf has kindly provided patches for previous jQuery versions.
Download
You can get the files from the jQuery CDN, or link to them directly:
https://code.jquery.com/jquery-3.7.1.js
https://code.jquery.com/jquery-3.7.1.min.js
You can also get this release from npm:
npm install jquery@3.7.1
Slim build
Sometimes you don’t need ajax, or you prefer to use one of the many standalone libraries that focus on ajax requests. And often it is simpler to use a combination of CSS and class manipulation for web animations. Along with the regular version of jQuery that includes the ajax and effects modules, we’ve released a “slim” version that excludes these modules. The size of jQuery is very rarely a load performance concern these days, but the slim build is about 6k gzipped bytes smaller than the regular version. These files are also available in the npm package and on the CDN:
https://code.jquery.com/jquery-3.7.1.slim.js
https://code.jquery.com/jquery-3.7.1.slim.min.js
These updates are already available as the current versions on npm and Bower. Information on all the ways to get jQuery is available at https://jquery.com/download/. Public CDNs receive their copies today, please give them a few days to post the files. If you’re anxious to get a quick start, use the files on our CDN until they have a chance to update.
Thanks
Thank you to all of you who participated in this release by submitting patches, reporting bugs, or testing, including Gabriela Gutierrez, Michal Golebiowski-Owczarek, Timo Tijhof, Dimitri Papadopoulos Orfanos and the whole jQuery team.
We’re on Mastodon!
jQuery now has its very own Mastodon account. We will be cross posting to both Twitter and Mastodon from now on. Also, you may be interested in following some of our team members that have Mastodon accounts.
jQuery: https://social.lfx.dev/@jquery
mgol: https://hachyderm.io/@mgol
timmywil: https://hachyderm.io/@timmywil
Changelog
Full changelog: 3.7.1
Build
- Generate the slim build on `grunt` & run `compare_size` on it (763ade6d)
- Make sure `*.cjs` & `*.mjs` files use UNIX line endings as well (3c18c1f3)
- switch preferred email for timmywil (72ae577c)
- Build: Bump actions/checkout from 3.5.2 to 3.5.3 (a370d7df)
- Reference GitHub Actions by commit SHAs (#5266, 0ea85dad)
- Test on Node.js 20, stop testing on Node.js 14 & 19 (b473729d)
- Updating the 3.x-stable version to 3.7.1-pre. (64460dac)
Core
CSS
Deprecated
- Define `.hover()` using non-deprecated methods (7287894f)
Docs
- Fix typos found by codespell (4a29888c)
- remove stale gitter badge from readme (141518e9)
- Remove the “Grunt build” section from the PR template (992a6653)
Release
Selector
- Only attach the unload handler in IE & Edge Legacy (#5281, 87467a6f)
- Re-expose jQuery.find.tokenize (3.x version) (#5259, 13a870b6)