jQuery 3.3.1 – fixed dependencies in release tag

Posted on by

We encountered an issue in the release for jQuery 3.3.0, so we’ve immediately released another tag. The code itself is identical, but our release dependencies (only used during release) were added to the dependencies of the jQuery package itself due to the new behavior of npm in version 5+.

jQuery 3.3.1 is now recommended if installing from npm or GitHub. If using jQuery on any CDN, the built file only differs in the version number.

We apologize for any inconvenience and have updated our release script to account for this issue.

Please see the jQuery 3.3.0 blog post for all relevant code changes in this release.

Download

You can get the files from the jQuery CDN, or link to them directly:

https://code.jquery.com/jquery-3.3.1.js

https://code.jquery.com/jquery-3.3.1.min.js

You can also get this release from npm:

npm install jquery@3.3.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 all your 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 – 24k vs 30k. These files are also available in the npm package and on the CDN:

https://code.jquery.com/jquery-3.3.1.slim.js
https://code.jquery.com/jquery-3.3.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.

jQuery 3.3.0 – A fragrant bouquet of deprecations and…is that a new feature?

Posted on by

It’s been a while since the last jQuery release, but the Core team hasn’t been idle. We’ve got an all new minor release for you, and it’s even got a new feature in it!

The .addClass(), .removeClass(), and .toggleClass() methods now accept an array of classes.


jQuery(elem).addClass([
   'dave', 'michał', 
   'oleg', 'richard', 
   'jason', 'timmy'
]);

Generally, jQuery is not looking to add anything new. We tend to focus more on what we can remove rather than what we can add. But as soon as we saw this feature request, we wondered how it hadn’t been added before.

There should be no compatibility issues if upgrading from jQuery 3.0+. If you haven’t yet upgraded to jQuery 3+, please have a look at the 3.0 Upgrade Guide. The jQuery Migrate 3.0 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.

Deprecations

We’ve pruned some roses, lilies, and sunflowers in this release. Some of these will smell sweeter than others, but put them together, and you’ve got a beautiful bouquet of…depre-carnations.

These functions have either lost some of their usefulness over time, are considered to be less favorable than available alternatives, or were intended for internal usage from the beginning. While most of these will be removed in jQuery 4.0, it’s worth noting that we do not consider the deprecation of a method to mean that it will be removed; it means that we encourage the use of alternatives. For instance, event aliases like .click() will likely never be removed.

Command-line Testing

The magnificent Timo Tijhof has made it possible to run all jQuery tests on the command line, using grunt and karma. This is something we’ve always wanted but it was complicated by our need for a php server to run ajax tests. Thanks to Timo for making it happen!

Note: jQuery no longer runs any tests on PhantomJS 1.x.

Download

You can get the files from the jQuery CDN, or link to them directly:

https://code.jquery.com/jquery-3.3.0.js

https://code.jquery.com/jquery-3.3.0.min.js

You can also get this release from npm:

npm install jquery@3.3.0

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 all your 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 – 24k vs 30k. These files are also available in the npm package and on the CDN:

https://code.jquery.com/jquery-3.3.0.slim.js
https://code.jquery.com/jquery-3.3.0.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 Andreas Solledar, Basil Belokon, Boom Lee, “CDAGaming”, Dave Methvin, Erik Lax, Henry Zhu, Jason Bedard, Jordan Beland, Matan Kotler-Berkowitz, Michał Gołębiowski-Owczarek, Nilton Cesar, Pierre Spring, Richard Gibson, Saptak Sengupta, Shashanka Nataraj, Steve Mao, Timo Tijhof, Faisal Irfan Yar Khan, and the whole jQuery team.

 

Changelog

GitHub changelog: Issues fixed in 3.3.0 | All changes

Ajax

  • Add an ontimeout handler to all requests (#3586, 262acc6f)
  • Don’t process non-string data property on no-entity-body requests (#3438, d7237896)

Attributes

  • Feature: Allow array param in add/remove/toggleClass (#3532, 80f57f8a)

Build

  • Test on Node.js 8, stop testing on Node.js 7 (bef46a2a)
  • Update to Babel 7, use for-of plugin instead of preset-es2015 (90bac40a)
  • Remove package-lock.json, add it to .gitignore (#3792, 7037facc)
  • Test on Node.js 9 (3e902a81)
  • Fix UglifyJS output in Android 4.0; update uglify (#3743, c9efd11f)

Core

CSS

  • Drop the float mapping from cssProps (bbf33428)
  • Correctly set support properties with non-default zoom (#3808, f00a0759)
  • Detect more WebKit styles erroneously reported as percentages (#3777, 94ddf620)
  • Retrieve inline style before computed (c4598da4)
  • Avoid unit-conversion interference from CSS upper bounds (#2144, 692f9d4d)

Deferred

Dimensions

Docs

  • Create CODE_OF_CONDUCT.md (e84d3bc0)
  • Update links to HTML spec for stripAndCollapse (#3594) (e1b1b2d7)

Event

Filter

Manipulation

  • Use `.children` to select tbody elements (a88b48ea)
  • Add support for scripts with module type (#3871, 5d3a968e)

Offset

Support