jQuery: A unified API for JavaScript applications in browsers and Node
A JavaScript library for unified DOM work that also supports Node and ESM, with full 4.x support.
GitHub jquery/jquery Updated 2026-11-19 Branch main Stars 60.0K Forks 20.7K
JavaScript DOM manipulation QUnit Node.js ECMAScript Modules Browser

🧭 Decision Guide

Try it if you

  • You maintain a browser JavaScript application and need jQuery DOM, event, or build capabilities.
    The README sections “Environments in which to use jQuery” and “How to build your own jQuery”.
  • Your project needs jQuery in Node, browser extensions, or other non-browser environments.
    The README explicitly states: “jQuery also supports Node, browser extensions, and other non-browser environments.”
  • You need jquery.slim.js, jquery.module.js, or a custom module build.
    The README sections “Build all jQuery release files” and “Building a Custom jQuery”.

Skip it if you

  • Your deployment depends on official maintenance for jQuery 1.x or 2.x.
    The README’s “Version support” table marks 1.x and 2.x as None.
  • You require every custom build to be continuously tested by the project.
    The README explicitly says: “Non-official custom builds are not regularly tested. Use them at your own risk.”
  • Your test environment cannot provide a local server that supports PHP.
    The README’s “Running the Unit Tests” section requires a local server that supports PHP.

Requirements

  • Building requires the latest Node.js/npm and git 1.7 or later.
  • Unit tests require a local server that supports PHP, and the site must run from the root directory.
  • The README states: “No database is required.”

First step (verbatim from README)

npm run build

Watch out

  • Excluding css also removes the effects, offset, and dimensions modules.
    The README’s “Custom Build Examples” section.
  • The test site must run from the root directory, not from the test directory.
    The README’s “Running the Unit Tests” section.
  • Running git reset --hard upstream/main and git clean -fdx removes local work.
    The README’s “Cleaning” section explicitly warns that worked-on content is removed.

Alternatives

  • Native querySelectorAll:When you only need selector capability and not other jQuery modules, use the native querySelectorAll wrapper described in the README.
    Building a Custom jQuery

Not stated in the README

  • The README does not provide browser compatibility details for jQuery 4.1.0.
  • The README does not list specific changes from jQuery 4.0.0 to 4.1.0.
  • The README does not provide npm dependency count, build time, or artifact size.
  • The README does not specify a minimum Node.js version; it only says “latest Node.js/npm”.
  • The README does not explain the specific reason for 60,008 stars and 266 new stars on 2026-11-19.

💡 Deep Analysis

6
Yes I am creating a custom jQuery build for a traditional admin console. I only need DOM, selectors, and events, and explicitly do not need Ajax, effects, offset, dimensions, or wrap. Can I exclude these modules directly?
For: A frontend engineer creating a custom jQuery build for a traditional admin console that needs DOM, selectors, and events but not Ajax, animation, or dimension modules

Yes. The README explicitly supports excluding modules, and every module in your list has a documented exclusion path; however, core must remain and dependency effects must be respected.

  • The README says any module may be excluded except core, so core cannot be removed.
  • --exclude=ajax removes all Ajax functionality; excluding css also removes dependent effects, offset, and dimensions modules.
  • The README provides a combined example using -e wrap, showing that these top-level modules can be removed together.
  • Non-official custom builds are not regularly tested, and the README says they are used at the consumer’s own risk.

You can generate this build, but it is not the official full distribution, and a successful build does not prove that every admin-console behavior remains available.

  • Building a Custom jQuery: “Any module may be excluded except for core”
  • Custom Build Examples: “Exclude all ajax functionality: npm run build -- --exclude=ajax”
  • Custom Build Examples: “Excluding css removes modules depending on CSS: effects, offset, dimensions”
  • Custom Build Examples: “Non-official custom builds are not regularly tested. Use them at your own risk”
Not stated in the README:Whether existing admin-console code or plugins indirectly call excluded modules;Whether retained selector, event, and other modules have application-specific dependencies not covered by the README
No I plan to contribute to jQuery core. I can install the latest Node.js/npm and Git, but I do not have a PHP-capable local server. Can I complete the full test workflow described in the README?
For: An open-source maintainer contributing to jQuery core who uses Node.js/npm to build the JavaScript library and needs to run QUnit tests

No. You cannot complete the full test workflow directly because the README explicitly requires a PHP-capable local server for unit tests; Node.js/npm and Git cover build and basic development setup, but not the complete test environment.

  • The build requirements are the latest Node.js/npm and Git 1.7 or later.
  • The testing section requires a local server that supports PHP, with the site served from the repository root; no database is required.
  • The README lists WAMP for Windows, MAMP for macOS, LAMP for Linux, and Mongoose as a multi-platform option.
  • The test system uses QUnit, and some tests can run through the iframe testing helper.

Missing a PHP server therefore blocks the README-defined full test path, though it does not necessarily block every source-build operation.

  • What you need to build your own jQuery: “latest Node.js/npm and git 1.7 or later”
  • Running the Unit Tests: “Run the unit tests with a local server that supports PHP”
  • Running the Unit Tests: “Ensure that you run the site from the root directory, not the test directory”
  • Running the Unit Tests: “No database is required”; WAMP, MAMP, LAMP, and Mongoose are listed
npm install
Not stated in the README:The operating system and whether WAMP, MAMP, LAMP, or Mongoose can be installed;The README does not state whether all PHP requirements can be bypassed for build-only work or partial QUnit execution
Yes I use jQuery 4.x in a browser extension, require ESM loading, and only need DOM, event, and CSS operations. Can I ship an ESM-based Slim build?
For: A JavaScript developer who needs to load jQuery as ESM in a browser extension while removing Ajax and effects modules to control resource size

Yes. The README explicitly covers browser extensions, ESM output, and the Slim build, matching both your loading model and feature-reduction requirement.

  • The README states that jQuery supports browser extensions and other non-browser environments.
  • jquery.slim.module.js is the official Slim ESM variant, placed in dist-module/, and it exports named jQuery and $ bindings.
  • Slim can exclude Ajax. The README also states that excluding CSS removes dependent modules including effects, offset, and dimensions, so excluding CSS is not suitable if CSS operations are still required.

Your requirements match an official distribution variant, but the extension must not depend on Ajax or other features removed from Slim.

  • Environments in which to use jQuery: “jQuery also supports Node, browser extensions, and other non-browser environments”
  • Build all jQuery release files: `jquery.slim.module.js` is an ESM variant placed in `dist-module/`
  • Custom Build Examples: “Excluding css removes modules depending on CSS: effects, offset, dimensions”
npm run build -- --filename=jquery.slim.module.js --slim --esm
Not stated in the README:Whether the browser-extension bundler handles the ESM file and named exports correctly;Whether the extension indirectly uses Ajax, effects, offset, or dimensions functionality absent from Slim
It depends I maintain a traditional multi-page site that still uses jQuery 1.x or 2.x and relies on many existing plugins and legacy APIs. Is upgrading to jQuery 4.x appropriate now?
For: A frontend developer maintaining a traditional multi-page site that still runs jQuery 1.x or 2.x, depends on existing plugins, and plans to move to a supported release

It depends, but remaining on 1.x or 2.x is not appropriate long term because both branches are unsupported, while 4.x is the fully supported line.

  • The README support table says 4.x is Full, 3.x is Critical-only, and 2.x and 1.x have no support.
  • The README recommends that all users upgrade to the latest jQuery version for better performance, security, and features.
  • If existing plugins depend on removed or changed APIs, the migration cost depends on plugin compatibility; the README provides no complete plugin matrix or automated migration path.

The project is therefore suitable as the target upgrade, but the site cannot be assumed to support a direct replacement based on the major version alone.

  • Version support: 4.x Full; 3.x Critical-only; 2.x and 1.x None
  • Version support: “We recommend that all users upgrade to the latest version of jQuery”
  • Project insight: legacy plugins, old-browser strategies, and deprecated APIs may create migration cost
Not stated in the README:Whether the existing plugins support jQuery 4.x;Which removed or deprecated APIs the site actually uses;The target browser range and its compatibility with jQuery 4.x
Yes I maintain a traditional multi-page site and need a unified way to handle DOM selection, events, Ajax, CSS, and basic animation, but I do not need a component model, routing, or reactive state management. Is jQuery 4.x still suitable?
For: A JavaScript developer maintaining a traditional multi-page site who needs DOM selectors, events, Ajax, and basic animation but does not plan to adopt a full single-page application framework

Yes. jQuery 4.x matches the needs of a traditional multi-page site that requires DOM, event, Ajax, CSS, and basic animation APIs without forcing a migration to a single-page application.

  • Project insight lists selectors and traversal, events, Ajax, CSS, effects, offset, dimensions, and wrapping as supported areas.
  • The README support table marks 4.x as Full, making it the currently supported line.
  • Project insight identifies its present value in maintaining legacy systems, preserving plugin compatibility, and enabling low-cost incremental changes.
  • However, it does not provide a component model, reactive state management, routing, or a complete SPA architecture. If the application evolves into a complex componentized system, jQuery alone will no longer match the requirement.

Under your stated constraints, this is a capability fit, not a claim that jQuery is a modern application framework.

  • Project insight solution_analysis: selector, ajax, css, effects, offset, dimensions, and wrap modules
  • Version support: 4.x Full
  • Project insight market_gap: current value is mainly in legacy maintenance, plugin compatibility, and low-cost incremental modernization
  • Project insight usage_limitations: no component model, reactive state management, routing, or complete application architecture
Not stated in the README:Whether the site’s current plugins support jQuery 4.x;Whether the pages use deprecated or removed APIs;The target browser range and its support for jQuery 4.x
No I need to reuse some jQuery capabilities in both Node and browser-extension environments. The README explicitly mentions both environments, but does that mean all DOM, Ajax, and event features run identically in both?
For: A JavaScript developer who wants to reuse jQuery capabilities across Node and browser extensions without adopting a full browser-page runtime model

No. The statement that jQuery supports Node and browser extensions should not be interpreted as a promise that every browser feature behaves identically in both environments; the README only identifies supported environment categories.

  • The README says jQuery supports Node, browser extensions, and other non-browser environments, but it does not define the runtime boundaries for every DOM, Ajax, or event module.
  • Project insight states that the target runtime must provide the relevant DOM, networking, and event capabilities; jQuery cannot eliminate all environment differences.
  • jQuery is primarily positioned as a browser DOM-enhancement and interaction layer, so the reusable subset in Node depends on which required objects the runtime provides.

Reuse is possible, but compatibility must be determined by the specific modules and runtime capabilities rather than by the environment list alone.

  • Environments in which to use jQuery: “jQuery also supports Node, browser extensions, and other non-browser environments”
  • Project insight: the runtime must provide the required DOM, networking, and event capabilities
  • Project insight: jQuery primarily addresses DOM enhancement and browser interaction
Not stated in the README:Whether the Node runtime provides the required document, window, or other DOM APIs;Whether the browser extension code runs in a page context, content script, or background environment;Whether the target functionality depends on browser-specific Ajax, event, or CSS capabilities

✨ Highlights

  • Supports browsers, Node, and browser extension environments
  • npm run build generates artifacts in dist
  • Supports jquery.slim.js and ESM builds
  • 4.x has full support; 3.x receives critical updates only

🔧 Engineering

  • Build jQuery with npm run build, producing dist/ and minified files
  • npm run build:all generates jquery.js, slim, and module variants
  • The Build Script can exclude ajax, css, deprecated, and other modules
  • The QUnit test suite provides DOM, iframe, and native-event test methods

⚠️ Risks

  • 2.x and 1.x are unsupported; 3.x receives critical updates only
  • Custom builds are not regularly tested; the README says to use them at your own risk
  • Running unit tests requires a local server that supports PHP
  • Building requires the latest Node.js/npm and git 1.7 or later

👥 For who?

  • Teams maintaining browser JavaScript applications that need DOM APIs
  • Developers targeting Node, browser extensions, or other non-browser environments
  • Projects requiring jquery.slim.js or ECMAScript Modules artifacts