WordPress 5.6 jQuery version updates and solution for jQuery
Last updated:
WordPress 5.6 will include the latest version of jQuery 3.5.1, a major upgrade from 1.x to 3.x. Here's the schedule of jQuery versions and the differences.
What is jQuery?
jQuery is a JavaScript library published as open source software (OSS).
It can be written in less code and absorbs the differences in behavior between browsers.
jQuery Upgrade Schedule
WordPress‘s bundled jQuery will be upgraded in the following steps.
WordPress 5.5
WordPress 5.5 was released on August 11, 2020.
- jQuery 1.12.4
- Remove jQuery Migrate 1.x
Features using old jQuery code may not work due to the removal of jQuery Migrate.
Install and activate EnablejQuery MigrateHelper to resolve it.
The following article describes WordPress 5.5.
What’s new in WordPress 5.5? New Features and Changes
WordPress 5.6
WordPress 5.6 is scheduled for release on December 8, 2020.
- jQuery 3.5.1
- jQuery Migrate 3.3.2
- jQuery UI 1.12.1
The following article describes WordPress 5.6.
What’s new in WordPress 5.6? New Features and Changes
WordPress 5.7
Remove jQuery Migrate
The following article describes WordPress 5.7.
WordPress 5.7 What’s New? New Features and Changes
The difference between jQuery 1.x and 3.x
Support Browsers
3.x
Browser | Version |
---|---|
Chrome / Edge / Firefox / Safari | The latest version and its one previous version |
Opera | Latest version |
Internet Explorer | 9 or more |
Safari for iOS | iOS 7 or more |
Android | 4.0 or more |
1.x
In addition to the above, legacy browsers are supported.
Browser | Version |
---|---|
Internet Explorer | 6-8 |
Opera | 12.1x |
Safari | 5.1 or more |
If you want to support IE8 or lower, you need to use the jQuery 1.x series.
What is jQuery Migrate?
jQuery Migrate is a migration library that solves compatibility issues with different versions of jQuery.
Restore or detect deprecated/deleted code.
How to upgrade from jQuery 1.12.x series to 3.x series?
To upgrade jQuery, do the following steps
- Upgrade to jQuery 3.x
- Fix the warning using jQuery Migrate 3.x series
- Remove jQuery Migrate
Test jQuery in WordPress
There is a plugin that allows you to test jQuery before updating WordPress. Do not use it in the production environment.
Fix the deprecated/removed code
The following code is deprecated/removed in jQuery 3.5.1 and should be fixed before updating WordPress.
live()
Removed in jQuery 1.9. Use on() instead of live().
die()
Removed in jQuery 1.9. Use on() instead of die().
size()
Removed in jQuery 3.0. Use length instead of size().
error()
Removed in jQuery 3.0. use on() instead of error().
load()/unload()
Removed in jQuery 3.0; use on() or trigger() instead of load()/unload().
bind()
Since jQuery 3.0, it is deprecated; use on() instead of bind().
unbind()
Since jQuery 3.0, it has been deprecated. off() is used instead of unbind().