Today for a customer I had to use a special plugin for jQuery that needs a jQuery version equal or major than 1.6.1.
As you know Drupal 7 is shipped with jQuery 1.4.4 and so is not ready for the plugin I need to use, there is a plugin that update jQuery and jQuery UI but where is the fun?
The procedure is pretty quick:
- Download the jQuery version you need from from the official source.
- Place the jQuery version you downloaded in your theme js’s folder (like
- Create/Modify your theme’s
template.phpfile as described below.
Now for the
template.php, you need to use the hook_js_alter to replace the native jQuery:
After we clear the cache we will have the new jQuery version.
Keep in mind that changing the jQuery version may create some incompatibility issues with the other Drupal core scripts.