Webflow sync, pageviews & more.
NEW

How can I ensure compatibility with the latest version of jQuery in newly published Webflow sites?

TL;DR
  • Avoid loading jQuery twice and rely on Webflow’s default v3.5.1 unless overriding manually.
  • Update custom code to support jQuery v3+, test thoroughly, and only replace Webflow’s version after disabling it and verifying compatibility.

To ensure compatibility with the latest version of jQuery in your Webflow site, you need to manage Webflow’s built-in jQuery usage and verify that your custom code works with the latest version.

1. Understand Webflow’s jQuery Version

  • Webflow currently includes jQuery v3.5.1 by default in all projects.
  • This version is loaded automatically unless you disable it manually.

2. Avoid Loading jQuery Twice

  • Do not manually include jQuery from a CDN if you’re relying on Webflow’s default version.
  • Loading multiple versions of jQuery can lead to conflicts and unpredictable behavior.

3. Enable jQuery Compatibility Mode (if needed)

  • If using older plugins or custom code that depends on jQuery v1.x or v2.x patterns, use jQuery’s noConflict() mode.
  • But for modern compatibility, convert legacy code to support jQuery v3+ instead.

4. Test with a Newer jQuery Version (Advanced)

  • If you want to test compatibility with a newer version than what Webflow provides:

  • Disable Webflow’s jQuery: Go to Project Settings > Custom Code > Footer, and uncheck Use jQuery.

  • Add your own jQuery version by including the <script src="..."> tag in the Before field, using a CDN.

  • Use a stable version from a source like https://code.jquery.com.

    Example:
    <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>

  • Verify all interactions and scripts still function as expected.

5. Update Custom Code for Compatibility

  • Review all custom jQuery code to ensure:
  • No usage of deprecated methods, like .bind(), .live(), or .size() (which were removed in v3).
  • Proper document ready syntax, such as $(function() { ... });
  • Avoid relying on global $ variable if multiple libraries are in use.

6. Test Your Site Thoroughly

  • Open your site in multiple browsers and test interactions, animations, and plugin behavior.
  • Use the browser console (F12) to check for any jQuery-related errors or warnings.

7. Monitor jQuery Updates from Webflow

  • Webflow occasionally updates its bundled jQuery version—monitor updates through the Webflow Release Notes.
  • You can’t control the built-in jQuery version unless you override it manually (as explained above).

Summary

To ensure jQuery compatibility, make sure not to load it twice, convert legacy code to jQuery v3+ syntax, and optionally override Webflow’s version only after full testing. Webflow currently includes jQuery 3.5.1 by default, which is compatible with most modern plugins and scripts.

Rate this answer

Other Webflow Questions