How to Check jQuery Version on a Page

Determining the active version of jQuery running on a website is crucial for debugging compatibility issues, auditing third-party scripts, and planning library updates. This guide provides the exact commands and methods needed to quickly identify the loaded jQuery version using your browser's developer tools.

1. Open Browser Developer Tools

To run commands against the current webpage, open the developer console:

  • Chrome, Edge, or Firefox: Press F12 (Windows/Linux) or Cmd + Option + I (Mac), then navigate to the Console tab.
  • Safari: Enable the Develop menu in Safari Settings > Advanced, then press Cmd + Option + C.

2. Check the Version via Console Commands

Once inside the console, type any of the following commands and press Enter:

jQuery.fn.jquery

This is the most reliable method because it uses the full jQuery namespace, bypassing any conflicts where the $ alias has been reassigned to another library.

Method B: Using $.fn.jquery

$.fn.jquery

If the default $ shortcut is still mapped to jQuery, this returns the exact same version string (e.g., "3.7.1").

Method C: Using $().jquery

$().jquery

This accesses the jquery property on a newly instantiated jQuery object. It works equivalently to accessing .fn.jquery.


3. Handling Special Scenarios

The $ Variable Returns undefined or an Error

If running $.fn.jquery returns an error such as Cannot read properties of undefined, the site likely runs in no-conflict mode (jQuery.noConflict()). Use the full variable name instead:

window.jQuery.fn.jquery

Checking for Multiple jQuery Versions

Some websites load multiple versions unintentionally. You can check if jQuery is present and whether another version exists under an alias by inspecting the window object:

console.log("Current version:", jQuery.fn.jquery);

To inspect scripts manually, you can also search the page source for jQuery script tags:

document.querySelectorAll('script[src*="jquery"]').forEach(s => console.log(s.src));

This lists the URLs of all loaded jQuery script tags, often revealing the version number directly in the filename.