You are here

Update Drupal 7's jQuery Version To 3.7.1 With jQuery Update

The jQuery Update module is a great option for updating Drupal 7 to use a modern and supported version of jQuery. While Drupal 7 includes the long-outdated jQuery 1.4, jQuery Update can be configured to use jQuery 3.7.1 as well as jQuery Migrate.

How To

  1. Download and install jQuery Update 4.1 for Drupal 7 as you'd normally install a module
  2. Run update.php and then enable the module as normal, ensuring you set permissions to be able to access the module from the appropriate roles
  3. In the module configuration, click the Custom Paths section
  4. Enter the following details:
    • Custom jQuery path: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js
    • Custom jQuery version: 3.7.1
    • Custom jQuery UI path: https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.14.1/jquery-ui.min.js
    • Custom jQuery UI version: 1.14.1
    • Custom jQuery Migrate path: https://cdnjs.cloudflare.com/ajax/libs/jquery-migrate/3.5.2/jquery-migrate.min.js
    • Custom jQuery Migrate version: 3.52
    • Custom jQuery Cookie path: https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js
    • Custom jQuery UI version: 1.4.1
    • Custom jQuery Form path: https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.3.0/jquery.form.min.js
    • Custom jQuery Form version: 4.3.0
  5. Click Save Configuration
  6. In the Default jQuery version dropdown, select 3.7.1 (custom)
  7. Click Performance and select Production (minified)
  8. Click jQuery Migrate and check the box for Enable jQuery Migrate Plugin
  9. Click Theme Overrides and ensure all themes are set to Site Default
  10. Click Save Configuration

You should probably clear your caches for safe measure at this point. This should be it. Hope it helps you out.

jQuery Migrate Note: Depending on your usage, some sites may do better with jQuery Migrate 1.4.1.