THIS DOCUMENTATION IS TO BE CONSIDERED INCOMPLETE/DFRAT TILL BACKDROP v1.26.0 IS RELEASED (slated for September 15, 2023) - THINGS MENTIONED HERE MAY CHANGE
Starting with version 1.26.0, Backdrop CMS uses jQuery 3.x by default on new sites, with jQuery 1.x still provided as a fallback for sites that may have incompatible modules or themes. When upgrading existing sites to Backdrop core 1.26.0, the 1.x version of jQuery will be retained. You can manually switch the version used by your site by navigating to Administration → Configuration → Development → jQuery (/admin/config/development/jquery).
If you want to work with different versions of jQuery on your local than on production (for instance while adapting your code to work with v3.x), you can use the following lines in your settings.php or local.settings.php files to override the version that has has otherwise been set via configuration:
- for v3.x: $config['system.core']['jquery_version'] = 'default';
- for v1.x: $config['system.core']['jquery_version'] = 'legacy';
jQuery 1.x will only receive minimum support (best efforts to fix bugs if they don't exist in version 3.x, and only incorporate security fixes if they are provided upstream). It will be removed in Backdrop v2.x (not scheduled before January 2025).
This is a short overview of how you can use jQuery with Backdrop. For further guidance see the official jQuery documentation itself.
[more to come]