jQuery — New Wave JavaScript

Meetings are currently held on the matrix.org platform.

Meeting minutes can be found at meetings.jquery.org.

Contribution Guides

In the spirit of open source software development, jQuery always encourages community code contribution. To help you get started and before you jump into writing code, be sure to read these important contribution guidelines thoroughly:

  1. Getting Involved
  2. Core Style Guide
  3. Writing Code for jQuery Projects

References to issues/PRs

GitHub issues/PRs are usually referenced via gh-NUMBER, where NUMBER is the numerical ID of the issue/PR. You can find such an issue/PR under https://github.com/jquery/jquery/issues/NUMBER.

jQuery has used a different bug tracker - based on Trac - in the past, available under bugs.jquery.com. It is being kept in read only mode so that referring to past discussions is possible. When jQuery source references one of those issues, it uses the pattern trac-NUMBER, where NUMBER is the numerical ID of the issue. You can find such an issue under https://bugs.jquery.com/ticket/NUMBER.

Environments in which to use jQuery

  • Browser support
  • jQuery also supports Node, browser extensions, and other non-browser environments.

What you need to build your own jQuery

To build jQuery, you need to have the latest Node.js/npm and git 1.7 or later. Earlier versions might work, but are not supported.

For Windows, you have to download and install git and Node.js.

macOS users should install Homebrew. Once Homebrew is installed, run brew install git to install git, and brew install node to install Node.js.

Linux/BSD users should use their appropriate package managers to install git and Node.js, or build from source if you swing that way. Easy-peasy.

How to build your own jQuery

First, clone the jQuery git repo.

Then, enter the jquery directory, install dependencies, and run the build script:

cd jquery
npm install
npm run build

The built version of jQuery will be placed in the dist/ directory, along with a minified copy and associated map file.

Build all jQuery release files

To build all variants of jQuery, run the following command:

npm run build:all

This will create all of the variants that jQuery includes in a release, including jquery.js, jquery.slim.js, jquery.module.js, and jquery.slim.module.js along their associated minified files and sourcemaps.

jquery.module.js and jquery.slim.module.js are ECMAScript modules that export jQuery and $ as named exports are placed in the dist-module/ directory rather than the dist/ directory.

Building a Custom jQuery

The build script can be used to create a custom version of jQuery that includes only the modules you need.

Any module may be excluded except for core. When excluding selector, it is not removed but replaced with a small wrapper around native querySelectorAll (see below for more information).

Build Script Help

To see the full list of available options for the build script, run the following:

npm run build -- --help

Modules

To exclude a module, pass its path relative to the src folder (without the .js extension) to the --exclude option. When using the --include option, the default includes are dropped and a build is created with only those modules.

Some example modules that can be excluded or included are:

  • ajax: All AJAX functionality: $.ajax(), $.get(), $.post(), $.ajaxSetup(), .load(), transports, and ajax event shorthands such as .ajaxStart().

  • ajax/xhr: The XMLHTTPRequest AJAX transport only.

  • ajax/script: The <script> AJAX transport only; used to retrieve scripts.

  • ajax/jsonp: The JSONP AJAX transport only; depends on the ajax/script transport.

  • css: The .css() method. Also removes all modules depending on css (including effects, dimensions, and offset).

  • css/showHide: Non-animated .show(), .hide() and .toggle(); can be excluded if you use classes or explicit .css() calls to set the display property. Also removes the effects module.

  • deprecated: Methods documented as deprecated but not yet removed.

  • dimensions: The .width() and .height() methods, including inner- and outer- variations.

  • effects: The .animate() method and its shorthands such as .slideUp() or .hide("slow").

  • event: The .on() and .off() methods and all event functionality.

  • event/trigger: The .trigger() and .triggerHandler() methods.

  • offset: The .offset(), .position(), .offsetParent(), .scrollLeft(), and .scrollTop() methods.

  • wrap: The .wrap(), .wrapAll(), .wrapInner(), and .unwrap() methods.

  • core/ready: Exclude the ready module if you place your scripts at the end of the body. Any ready callbacks bound with jQuery() will simply be called immediately. However, jQuery(document).ready() will not be a function and .on("ready", ...) or similar will not be triggered.

  • deferred: Exclude jQuery.Deferred. This also excludes all modules that rely on Deferred, including ajax, effects, and queue, but replaces core/ready with core/ready-no-deferred.

  • exports/global: Exclude the attachment of global jQuery variables ($ and jQuery) to the window.

  • exports/amd: Exclude the AMD definition.

  • selector: The full jQuery selector engine. When this module is excluded, it is replaced with a rudimentary selector engine based on the browser's querySelectorAll method that does not support jQuery selector extensions or enhanced semantics. See the selector-native.js file for details.

Note: Excluding the full selector module will also exclude all jQuery selector extensions (such as effects/animatedSelector and css/hiddenVisibleSelectors).

AMD name

You can set the module name for jQuery's AMD definition. By default, it is set to "jquery", which plays nicely with plugins and third-party libraries, but there may be cases where you'd like to change this. Pass it to the --amd parameter:

npm run build -- --amd="custom-name"

Or, to define anonymously, leave the name blank.

npm run build -- --amd
File name and directory

The default name for the built jQuery file is jquery.js; it is placed under the dist/ directory. It's possible to change the file name using --filename and the directory using --dir. --dir is relative to the project root.

npm run build -- --slim --filename="jquery.slim.js" --dir="/tmp"

This would create a slim version of jQuery and place it under tmp/jquery.slim.js.

ECMAScript Module (ESM) mode

By default, jQuery generates a regular script JavaScript file. You can also generate an ECMAScript module exporting jQuery as the default export using the --esm parameter:

npm run build -- --filename=jquery.module.js --esm
Factory mode

By default, jQuery depends on a global window. For environments that don't have one, you can generate a factory build that exposes a function accepting window as a parameter that you can provide externally (see README of the published package for usage instructions). You can generate such a factory using the --factory parameter:

npm run build -- --filename=jquery.factory.js --factory

This option can be mixed with others like --esm or --slim:

npm run build -- --filename=jquery.factory.slim.module.js --factory --esm --slim --dir="/dist-module"

Custom Build Examples

Create a custom build using npm run build, listing the modules to be excluded. Excluding a top-level module also excludes its corresponding directory of modules.

Exclude all ajax functionality:

npm run build -- --exclude=ajax

Excluding css removes modules depending on CSS: effects, offset, dimensions.

npm run build -- --exclude=css

Exclude a bunch of modules (-e is an alias for --exclude):

npm run build -- -e ajax/jsonp -e css -e deprecated -e dimensions -e effects -e offset -e wrap

There is a special alias to generate a build with the same configuration as the official jQuery Slim build:

npm run build -- --filename=jquery.slim.js --slim

Or, to create the slim build as an esm module:

npm run build -- --filename=jquery.slim.module.js --slim --esm

Non-official custom builds are not regularly tested. Use them at your own risk.

Running the Unit Tests

Make sure you have the necessary dependencies:

npm install

Start npm start to auto-build jQuery as you work:

npm start

Run the unit tests with a local server that supports PHP. Ensure that you run the site from the root directory, not the "test" directory. No database is required. Pre-configured php local servers are available for Windows and Mac. Here are some options:

Essential Git

As the source code is handled by the Git version control system, it's useful to know some features used.

Cleaning

If you want to purge your working directory back to the status of upstream, the following commands can be used (remember everything you've worked on is gone after these):

git reset --hard upstream/main
git clean -fdx

Rebasing

For feature/topic branches, you should always use the --rebase flag to git pull, or if you are usually handling many temporary "to be in a github pull request" branches, run the following to automate this:

git config branch.autosetuprebase local

(see man git-config for more information)

Handling merge conflicts

If you're getting merge conflicts when merging, instead of editing the conflicted files manually, you can use the feature git mergetool. Even though the default tool xxdiff looks awful/old, it's rather useful.

The following are some commands that can be used there:

  • Ctrl + Alt + M - automerge as much as possible
  • b - jump to next merge conflict
  • s - change the order of the conflicted lines
  • u - undo a merge
  • left mouse button - mark a block to be the winner
  • middle mouse button - mark a line to be the winner
  • Ctrl + S - save
  • Ctrl + Q - quit

QUnit Reference

Test methods

expect( numAssertions );
stop();
start();

Note: QUnit's eventual addition of an argument to stop/start is ignored in this test suite so that start and stop can be passed as callbacks without worrying about their parameters.

Test assertions

ok( value, [message] );
equal( actual, expected, [message] );
notEqual( actual, expected, [message] );
deepEqual( actual, expected, [message] );
notDeepEqual( actual, expected, [message] );
strictEqual( actual, expected, [message] );
notStrictEqual( actual, expected, [message] );
throws( block, [expected], [message] );

Test Suite Convenience Methods Reference (See test/data/testinit.js)

Returns an array of elements with the given IDs

q( ... );

Example:

q("main", "foo", "bar");

=> [ div#main, span#foo, input#bar ]

Asserts that a selection matches the given IDs

t( testName, selector, [ "array", "of", "ids" ] );

Example:

t("Check for something", "//[a]", ["foo", "bar"]);

Fires a native DOM event without going through jQuery

fireNative( node, eventType )

Example:

fireNative( jQuery("#elem")[0], "click" );

Add random number to url to stop caching

url( "some/url" );

Example:

url("index.html");

=> "data/index.html?10538358428943"


url("mock.php?foo=bar");

=> "data/mock.php?foo=bar&10538358345554"

Run tests in an iframe

Some tests may require a document other than the standard test fixture, and these can be run in a separate iframe. The actual test code and assertions remain in jQuery's main test files; only the minimal test fixture markup and setup code should be placed in the iframe file.

testIframe( testName, fileName,
  function testCallback(
      assert, jQuery, window, document,
	  [ additional args ] ) {
	...
  } );

This loads a page, constructing a url with fileName "./data/" + fileName. The iframed page determines when the callback occurs in the test by including the "/test/data/iframeTest.js" script and calling startIframeTest( [ additional args ] ) when appropriate. Often this will be after either document ready or window.onload fires.

The testCallback receives the QUnit assert object created by testIframe for this test, followed by the global jQuery, window, and document from the iframe. If the iframe code passes any arguments to startIframeTest, they follow the document argument.

Questions?

If you have any questions, please feel free to ask on the Developing jQuery Core forum or in #jquery on libera.

jquery/jquery

{
"props": {
"initialPayload": {
"allShortcutsEnabled": false,
"path": "/",
"repo": {
"id": 167174,
"defaultBranch": "main",
"name": "jquery",
"ownerLogin": "jquery",
"currentUserCanPush": false,
"isFork": false,
"isEmpty": false,
"createdAt": "2009-04-03T15:20:14.000Z",
"ownerAvatar": "https://avatars.githubusercontent.com/u/70142?v=4",
"public": true,
"private": false,
"isOrgOwned": true
},
"currentUser": null,
"refInfo": {
"name": "main",
"listCacheKey": "v0:1721224213.0",
"canEdit": false,
"refType": "branch",
"currentOid": "be048a027d0581746f71df7c8eb3ce1d9bd10a40"
},
"tree": {
"items": [
{
"name": ".github",
"path": ".github",
"contentType": "directory"
},
{
"name": ".husky",
"path": ".husky",
"contentType": "directory"
},
{
"name": "build",
"path": "build",
"contentType": "directory"
},
{
"name": "dist-module",
"path": "dist-module",
"contentType": "directory"
},
{
"name": "dist",
"path": "dist",
"contentType": "directory"
},
{
"name": "src",
"path": "src",
"contentType": "directory"
},
{
"name": "test",
"path": "test",
"contentType": "directory"
},
{
"name": ".editorconfig",
"path": ".editorconfig",
"contentType": "file"
},
{
"name": ".gitattributes",
"path": ".gitattributes",
"contentType": "file"
},
{
"name": ".gitignore",
"path": ".gitignore",
"contentType": "file"
},
{
"name": ".mailmap",
"path": ".mailmap",
"contentType": "file"
},
{
"name": ".npmignore",
"path": ".npmignore",
"contentType": "file"
},
{
"name": ".npmrc",
"path": ".npmrc",
"contentType": "file"
},
{
"name": ".release-it.cjs",
"path": ".release-it.cjs",
"contentType": "file"
},
{
"name": "AUTHORS.txt",
"path": "AUTHORS.txt",
"contentType": "file"
},
{
"name": "CODE_OF_CONDUCT.md",
"path": "CODE_OF_CONDUCT.md",
"contentType": "file"
},
{
"name": "CONTRIBUTING.md",
"path": "CONTRIBUTING.md",
"contentType": "file"
},
{
"name": "LICENSE.txt",
"path": "LICENSE.txt",
"contentType": "file"
},
{
"name": "README.md",
"path": "README.md",
"contentType": "file"
},
{
"name": "SECURITY.md",
"path": "SECURITY.md",
"contentType": "file"
},
{
"name": "changelog.md",
"path": "changelog.md",
"contentType": "file"
},
{
"name": "eslint.config.js",
"path": "eslint.config.js",
"contentType": "file"
},
{
"name": "package-lock.json",
"path": "package-lock.json",
"contentType": "file"
},
{
"name": "package.json",
"path": "package.json",
"contentType": "file"
}
],
"templateDirectorySuggestionUrl": null,
"readme": null,
"totalCount": 24,
"showBranchInfobar": false
},
"fileTree": null,
"fileTreeProcessingTime": null,
"foldersToFetch": [],
"treeExpanded": false,
"symbolsExpanded": false,
"isOverview": true,
"overview": {
"banners": {
"shouldRecommendReadme": false,
"isPersonalRepo": false,
"showUseActionBanner": false,
"actionSlug": null,
"actionId": null,
"showProtectBranchBanner": false,
"publishBannersInfo": {
"dismissActionNoticePath": "/settings/dismiss-notice/publish_action_from_repo",
"releasePath": "/jquery/jquery/releases/new?marketplace=true",
"showPublishActionBanner": false
},
"interactionLimitBanner": null,
"showInvitationBanner": false,
"inviterName": null
},
"codeButton": {
"contactPath": "/contact",
"isEnterprise": false,
"local": {
"protocolInfo": {
"httpAvailable": true,
"sshAvailable": null,
"httpUrl": "https://github.com/jquery/jquery.git",
"showCloneWarning": null,
"sshUrl": null,
"sshCertificatesRequired": null,
"sshCertificatesAvailable": null,
"ghCliUrl": "gh repo clone jquery/jquery",
"defaultProtocol": "http",
"newSshKeyUrl": "/settings/ssh/new",
"setProtocolPath": "/users/set_protocol"
},
"platformInfo": {
"cloneUrl": "https://desktop.github.com",
"showVisualStudioCloneButton": false,
"visualStudioCloneUrl": "https://windows.github.com",
"showXcodeCloneButton": false,
"xcodeCloneUrl": "https://developer.apple.com",
"zipballUrl": "/jquery/jquery/archive/refs/heads/main.zip"
}
},
"newCodespacePath": "/codespaces/new?hide_repo_select=true&repo=167174"
},
"popovers": {
"rename": null,
"renamedParentRepo": null
},
"commitCount": "6,715",
"overviewFiles": [
{
"displayName": "README.md",
"repoName": "jquery",
"refName": "main",
"path": "README.md",
"preferredFileType": "readme",
"tabName": "README",
"richText": "<article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><div class=\"markdown-heading\" dir=\"auto\"><h1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"><a href=\"https://jquery.com/\" rel=\"nofollow\">jQuery</a> — New Wave JavaScript</h1><a id=\"user-content-jquery--new-wave-javascript\" class=\"anchor\" aria-label=\"Permalink: jQuery — New Wave JavaScript\" href=\"#jquery--new-wave-javascript\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">Meetings are currently held on the <a href=\"https://matrix.to/#/#jquery_meeting:gitter.im\" rel=\"nofollow\">matrix.org platform</a>.</p>\n<p dir=\"auto\">Meeting minutes can be found at <a href=\"https://meetings.jquery.org/category/core/\" rel=\"nofollow\">meetings.jquery.org</a>.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Contribution Guides</h2><a id=\"user-content-contribution-guides\" class=\"anchor\" aria-label=\"Permalink: Contribution Guides\" href=\"#contribution-guides\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">In the spirit of open source software development, jQuery always encourages community code contribution. To help you get started and before you jump into writing code, be sure to read these important contribution guidelines thoroughly:</p>\n<ol dir=\"auto\">\n<li><a href=\"https://contribute.jquery.org/\" rel=\"nofollow\">Getting Involved</a></li>\n<li><a href=\"https://contribute.jquery.org/style-guide/js/\" rel=\"nofollow\">Core Style Guide</a></li>\n<li><a href=\"https://contribute.jquery.org/code/\" rel=\"nofollow\">Writing Code for jQuery Projects</a></li>\n</ol>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">References to issues/PRs</h3><a id=\"user-content-references-to-issuesprs\" class=\"anchor\" aria-label=\"Permalink: References to issues/PRs\" href=\"#references-to-issuesprs\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">GitHub issues/PRs are usually referenced via <code>gh-NUMBER</code>, where <code>NUMBER</code> is the numerical ID of the issue/PR. You can find such an issue/PR under <code>https://github.com/jquery/jquery/issues/NUMBER</code>.</p>\n<p dir=\"auto\">jQuery has used a different bug tracker - based on Trac - in the past, available under <a href=\"https://bugs.jquery.com/\" rel=\"nofollow\">bugs.jquery.com</a>. It is being kept in read only mode so that referring to past discussions is possible. When jQuery source references one of those issues, it uses the pattern <code>trac-NUMBER</code>, where <code>NUMBER</code> is the numerical ID of the issue. You can find such an issue under <code>https://bugs.jquery.com/ticket/NUMBER</code>.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Environments in which to use jQuery</h2><a id=\"user-content-environments-in-which-to-use-jquery\" class=\"anchor\" aria-label=\"Permalink: Environments in which to use jQuery\" href=\"#environments-in-which-to-use-jquery\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<ul dir=\"auto\">\n<li><a href=\"https://jquery.com/browser-support/\" rel=\"nofollow\">Browser support</a></li>\n<li>jQuery also supports Node, browser extensions, and other non-browser environments.</li>\n</ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">What you need to build your own jQuery</h2><a id=\"user-content-what-you-need-to-build-your-own-jquery\" class=\"anchor\" aria-label=\"Permalink: What you need to build your own jQuery\" href=\"#what-you-need-to-build-your-own-jquery\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">To build jQuery, you need to have the latest Node.js/npm and git 1.7 or later. Earlier versions might work, but are not supported.</p>\n<p dir=\"auto\">For Windows, you have to download and install <a href=\"https://git-scm.com/downloads\" rel=\"nofollow\">git</a> and <a href=\"https://nodejs.org/en/download/\" rel=\"nofollow\">Node.js</a>.</p>\n<p dir=\"auto\">macOS users should install <a href=\"https://brew.sh/\" rel=\"nofollow\">Homebrew</a>. Once Homebrew is installed, run <code>brew install git</code> to install git,\nand <code>brew install node</code> to install Node.js.</p>\n<p dir=\"auto\">Linux/BSD users should use their appropriate package managers to install git and Node.js, or build from source\nif you swing that way. Easy-peasy.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">How to build your own jQuery</h2><a id=\"user-content-how-to-build-your-own-jquery\" class=\"anchor\" aria-label=\"Permalink: How to build your own jQuery\" href=\"#how-to-build-your-own-jquery\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">First, <a href=\"https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository\">clone the jQuery git repo</a>.</p>\n<p dir=\"auto\">Then, enter the jquery directory, install dependencies, and run the build script:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"cd jquery\nnpm install\nnpm run build\"><pre><span class=\"pl-c1\">cd</span> jquery\nnpm install\nnpm run build</pre></div>\n<p dir=\"auto\">The built version of jQuery will be placed in the <code>dist/</code> directory, along with a minified copy and associated map file.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Build all jQuery release files</h2><a id=\"user-content-build-all-jquery-release-files\" class=\"anchor\" aria-label=\"Permalink: Build all jQuery release files\" href=\"#build-all-jquery-release-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">To build all variants of jQuery, run the following command:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build:all\"><pre>npm run build:all</pre></div>\n<p dir=\"auto\">This will create all of the variants that jQuery includes in a release, including <code>jquery.js</code>, <code>jquery.slim.js</code>, <code>jquery.module.js</code>, and <code>jquery.slim.module.js</code> along their associated minified files and sourcemaps.</p>\n<p dir=\"auto\"><code>jquery.module.js</code> and <code>jquery.slim.module.js</code> are <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules\" rel=\"nofollow\">ECMAScript modules</a> that export <code>jQuery</code> and <code>$</code> as named exports are placed in the <code>dist-module/</code> directory rather than the <code>dist/</code> directory.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Building a Custom jQuery</h2><a id=\"user-content-building-a-custom-jquery\" class=\"anchor\" aria-label=\"Permalink: Building a Custom jQuery\" href=\"#building-a-custom-jquery\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">The build script can be used to create a custom version of jQuery that includes only the modules you need.</p>\n<p dir=\"auto\">Any module may be excluded except for <code>core</code>. When excluding <code>selector</code>, it is not removed but replaced with a small wrapper around native <code>querySelectorAll</code> (see below for more information).</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Build Script Help</h3><a id=\"user-content-build-script-help\" class=\"anchor\" aria-label=\"Permalink: Build Script Help\" href=\"#build-script-help\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">To see the full list of available options for the build script, run the following:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- --help\"><pre>npm run build -- --help</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Modules</h3><a id=\"user-content-modules\" class=\"anchor\" aria-label=\"Permalink: Modules\" href=\"#modules\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">To exclude a module, pass its path relative to the <code>src</code> folder (without the <code>.js</code> extension) to the <code>--exclude</code> option. When using the <code>--include</code> option, the default includes are dropped and a build is created with only those modules.</p>\n<p dir=\"auto\">Some example modules that can be excluded or included are:</p>\n<ul dir=\"auto\">\n<li>\n<p dir=\"auto\"><strong>ajax</strong>: All AJAX functionality: <code>$.ajax()</code>, <code>$.get()</code>, <code>$.post()</code>, <code>$.ajaxSetup()</code>, <code>.load()</code>, transports, and ajax event shorthands such as <code>.ajaxStart()</code>.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>ajax/xhr</strong>: The XMLHTTPRequest AJAX transport only.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>ajax/script</strong>: The <code>&lt;script&gt;</code> AJAX transport only; used to retrieve scripts.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>ajax/jsonp</strong>: The JSONP AJAX transport only; depends on the ajax/script transport.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>css</strong>: The <code>.css()</code> method. Also removes <strong>all</strong> modules depending on css (including <strong>effects</strong>, <strong>dimensions</strong>, and <strong>offset</strong>).</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>css/showHide</strong>: Non-animated <code>.show()</code>, <code>.hide()</code> and <code>.toggle()</code>; can be excluded if you use classes or explicit <code>.css()</code> calls to set the <code>display</code> property. Also removes the <strong>effects</strong> module.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>deprecated</strong>: Methods documented as deprecated but not yet removed.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>dimensions</strong>: The <code>.width()</code> and <code>.height()</code> methods, including <code>inner-</code> and <code>outer-</code> variations.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>effects</strong>: The <code>.animate()</code> method and its shorthands such as <code>.slideUp()</code> or <code>.hide(\"slow\")</code>.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>event</strong>: The <code>.on()</code> and <code>.off()</code> methods and all event functionality.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>event/trigger</strong>: The <code>.trigger()</code> and <code>.triggerHandler()</code> methods.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>offset</strong>: The <code>.offset()</code>, <code>.position()</code>, <code>.offsetParent()</code>, <code>.scrollLeft()</code>, and <code>.scrollTop()</code> methods.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>wrap</strong>: The <code>.wrap()</code>, <code>.wrapAll()</code>, <code>.wrapInner()</code>, and <code>.unwrap()</code> methods.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>core/ready</strong>: Exclude the ready module if you place your scripts at the end of the body. Any ready callbacks bound with <code>jQuery()</code> will simply be called immediately. However, <code>jQuery(document).ready()</code> will not be a function and <code>.on(\"ready\", ...)</code> or similar will not be triggered.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>deferred</strong>: Exclude jQuery.Deferred. This also excludes all modules that rely on Deferred, including <strong>ajax</strong>, <strong>effects</strong>, and <strong>queue</strong>, but replaces <strong>core/ready</strong> with <strong>core/ready-no-deferred</strong>.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>exports/global</strong>: Exclude the attachment of global jQuery variables ($ and jQuery) to the window.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>exports/amd</strong>: Exclude the AMD definition.</p>\n</li>\n<li>\n<p dir=\"auto\"><strong>selector</strong>: The full jQuery selector engine. When this module is excluded, it is replaced with a rudimentary selector engine based on the browser's <code>querySelectorAll</code> method that does not support jQuery selector extensions or enhanced semantics. See the <a href=\"https://github.com/jquery/jquery/blob/main/src/selector-native.js\">selector-native.js</a> file for details.</p>\n</li>\n</ul>\n<p dir=\"auto\"><em>Note</em>: Excluding the full <code>selector</code> module will also exclude all jQuery selector extensions (such as <code>effects/animatedSelector</code> and <code>css/hiddenVisibleSelectors</code>).</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h5 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">AMD name</h5><a id=\"user-content-amd-name\" class=\"anchor\" aria-label=\"Permalink: AMD name\" href=\"#amd-name\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">You can set the module name for jQuery's AMD definition. By default, it is set to \"jquery\", which plays nicely with plugins and third-party libraries, but there may be cases where you'd like to change this. Pass it to the <code>--amd</code> parameter:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- --amd=&quot;custom-name&quot;\"><pre>npm run build -- --amd=<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>custom-name<span class=\"pl-pds\">\"</span></span></pre></div>\n<p dir=\"auto\">Or, to define anonymously, leave the name blank.</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- --amd\"><pre>npm run build -- --amd</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h5 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">File name and directory</h5><a id=\"user-content-file-name-and-directory\" class=\"anchor\" aria-label=\"Permalink: File name and directory\" href=\"#file-name-and-directory\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">The default name for the built jQuery file is <code>jquery.js</code>; it is placed under the <code>dist/</code> directory. It's possible to change the file name using <code>--filename</code> and the directory using <code>--dir</code>. <code>--dir</code> is relative to the project root.</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- --slim --filename=&quot;jquery.slim.js&quot; --dir=&quot;/tmp&quot;\"><pre>npm run build -- --slim --filename=<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>jquery.slim.js<span class=\"pl-pds\">\"</span></span> --dir=<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>/tmp<span class=\"pl-pds\">\"</span></span></pre></div>\n<p dir=\"auto\">This would create a slim version of jQuery and place it under <code>tmp/jquery.slim.js</code>.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h5 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">ECMAScript Module (ESM) mode</h5><a id=\"user-content-ecmascript-module-esm-mode\" class=\"anchor\" aria-label=\"Permalink: ECMAScript Module (ESM) mode\" href=\"#ecmascript-module-esm-mode\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">By default, jQuery generates a regular script JavaScript file. You can also generate an ECMAScript module exporting <code>jQuery</code> as the default export using the <code>--esm</code> parameter:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- --filename=jquery.module.js --esm\"><pre>npm run build -- --filename=jquery.module.js --esm</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h5 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Factory mode</h5><a id=\"user-content-factory-mode\" class=\"anchor\" aria-label=\"Permalink: Factory mode\" href=\"#factory-mode\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">By default, jQuery depends on a global <code>window</code>. For environments that don't have one, you can generate a factory build that exposes a function accepting <code>window</code> as a parameter that you can provide externally (see <a href=\"/jquery/jquery/blob/main/build/fixtures/README.md\"><code>README</code> of the published package</a> for usage instructions). You can generate such a factory using the <code>--factory</code> parameter:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- --filename=jquery.factory.js --factory\"><pre>npm run build -- --filename=jquery.factory.js --factory</pre></div>\n<p dir=\"auto\">This option can be mixed with others like <code>--esm</code> or <code>--slim</code>:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- --filename=jquery.factory.slim.module.js --factory --esm --slim --dir=&quot;/dist-module&quot;\"><pre>npm run build -- --filename=jquery.factory.slim.module.js --factory --esm --slim --dir=<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>/dist-module<span class=\"pl-pds\">\"</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Custom Build Examples</h4><a id=\"user-content-custom-build-examples\" class=\"anchor\" aria-label=\"Permalink: Custom Build Examples\" href=\"#custom-build-examples\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">Create a custom build using <code>npm run build</code>, listing the modules to be excluded. Excluding a top-level module also excludes its corresponding directory of modules.</p>\n<p dir=\"auto\">Exclude all <strong>ajax</strong> functionality:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- --exclude=ajax\"><pre>npm run build -- --exclude=ajax</pre></div>\n<p dir=\"auto\">Excluding <strong>css</strong> removes modules depending on CSS: <strong>effects</strong>, <strong>offset</strong>, <strong>dimensions</strong>.</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- --exclude=css\"><pre>npm run build -- --exclude=css</pre></div>\n<p dir=\"auto\">Exclude a bunch of modules (<code>-e</code> is an alias for <code>--exclude</code>):</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- -e ajax/jsonp -e css -e deprecated -e dimensions -e effects -e offset -e wrap\"><pre>npm run build -- -e ajax/jsonp -e css -e deprecated -e dimensions -e effects -e offset -e wrap</pre></div>\n<p dir=\"auto\">There is a special alias to generate a build with the same configuration as the official jQuery Slim build:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- --filename=jquery.slim.js --slim\"><pre>npm run build -- --filename=jquery.slim.js --slim</pre></div>\n<p dir=\"auto\">Or, to create the slim build as an esm module:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm run build -- --filename=jquery.slim.module.js --slim --esm\"><pre>npm run build -- --filename=jquery.slim.module.js --slim --esm</pre></div>\n<p dir=\"auto\"><em>Non-official custom builds are not regularly tested. Use them at your own risk.</em></p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Running the Unit Tests</h2><a id=\"user-content-running-the-unit-tests\" class=\"anchor\" aria-label=\"Permalink: Running the Unit Tests\" href=\"#running-the-unit-tests\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">Make sure you have the necessary dependencies:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm install\"><pre>npm install</pre></div>\n<p dir=\"auto\">Start <code>npm start</code> to auto-build jQuery as you work:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm start\"><pre>npm start</pre></div>\n<p dir=\"auto\">Run the unit tests with a local server that supports PHP. Ensure that you run the site from the root directory, not the \"test\" directory. No database is required. Pre-configured php local servers are available for Windows and Mac. Here are some options:</p>\n<ul dir=\"auto\">\n<li>Windows: <a href=\"https://www.wampserver.com/en/\" rel=\"nofollow\">WAMP download</a></li>\n<li>Mac: <a href=\"https://www.mamp.info/en/downloads/\" rel=\"nofollow\">MAMP download</a></li>\n<li>Linux: <a href=\"https://www.linux.com/training-tutorials/easy-lamp-server-installation/\" rel=\"nofollow\">Setting up LAMP</a></li>\n<li><a href=\"https://code.google.com/p/mongoose/\" rel=\"nofollow\">Mongoose (most platforms)</a></li>\n</ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Essential Git</h2><a id=\"user-content-essential-git\" class=\"anchor\" aria-label=\"Permalink: Essential Git\" href=\"#essential-git\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">As the source code is handled by the Git version control system, it's useful to know some features used.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Cleaning</h3><a id=\"user-content-cleaning\" class=\"anchor\" aria-label=\"Permalink: Cleaning\" href=\"#cleaning\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">If you want to purge your working directory back to the status of upstream, the following commands can be used (remember everything you've worked on is gone after these):</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git reset --hard upstream/main\ngit clean -fdx\"><pre>git reset --hard upstream/main\ngit clean -fdx</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Rebasing</h3><a id=\"user-content-rebasing\" class=\"anchor\" aria-label=\"Permalink: Rebasing\" href=\"#rebasing\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">For feature/topic branches, you should always use the <code>--rebase</code> flag to <code>git pull</code>, or if you are usually handling many temporary \"to be in a github pull request\" branches, run the following to automate this:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config branch.autosetuprebase local\"><pre>git config branch.autosetuprebase <span class=\"pl-k\">local</span></pre></div>\n<p dir=\"auto\">(see <code>man git-config</code> for more information)</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Handling merge conflicts</h3><a id=\"user-content-handling-merge-conflicts\" class=\"anchor\" aria-label=\"Permalink: Handling merge conflicts\" href=\"#handling-merge-conflicts\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">If you're getting merge conflicts when merging, instead of editing the conflicted files manually, you can use the feature\n<code>git mergetool</code>. Even though the default tool <code>xxdiff</code> looks awful/old, it's rather useful.</p>\n<p dir=\"auto\">The following are some commands that can be used there:</p>\n<ul dir=\"auto\">\n<li><code>Ctrl + Alt + M</code> - automerge as much as possible</li>\n<li><code>b</code> - jump to next merge conflict</li>\n<li><code>s</code> - change the order of the conflicted lines</li>\n<li><code>u</code> - undo a merge</li>\n<li><code>left mouse button</code> - mark a block to be the winner</li>\n<li><code>middle mouse button</code> - mark a line to be the winner</li>\n<li><code>Ctrl + S</code> - save</li>\n<li><code>Ctrl + Q</code> - quit</li>\n</ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"><a href=\"https://api.qunitjs.com\" rel=\"nofollow\">QUnit</a> Reference</h2><a id=\"user-content-qunit-reference\" class=\"anchor\" aria-label=\"Permalink: QUnit Reference\" href=\"#qunit-reference\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Test methods</h3><a id=\"user-content-test-methods\" class=\"anchor\" aria-label=\"Permalink: Test methods\" href=\"#test-methods\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"expect( numAssertions );\nstop();\nstart();\"><pre><span class=\"pl-en\">expect</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">numAssertions</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-en\">stop</span><span class=\"pl-kos\">(</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-en\">start</span><span class=\"pl-kos\">(</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span></pre></div>\n<p dir=\"auto\"><em>Note</em>: QUnit's eventual addition of an argument to stop/start is ignored in this test suite so that start and stop can be passed as callbacks without worrying about their parameters.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Test assertions</h3><a id=\"user-content-test-assertions\" class=\"anchor\" aria-label=\"Permalink: Test assertions\" href=\"#test-assertions\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"ok( value, [message] );\nequal( actual, expected, [message] );\nnotEqual( actual, expected, [message] );\ndeepEqual( actual, expected, [message] );\nnotDeepEqual( actual, expected, [message] );\nstrictEqual( actual, expected, [message] );\nnotStrictEqual( actual, expected, [message] );\nthrows( block, [expected], [message] );\"><pre><span class=\"pl-en\">ok</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">value</span><span class=\"pl-kos\">,</span> <span class=\"pl-kos\">[</span><span class=\"pl-s1\">message</span><span class=\"pl-kos\">]</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-en\">equal</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">actual</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">expected</span><span class=\"pl-kos\">,</span> <span class=\"pl-kos\">[</span><span class=\"pl-s1\">message</span><span class=\"pl-kos\">]</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-en\">notEqual</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">actual</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">expected</span><span class=\"pl-kos\">,</span> <span class=\"pl-kos\">[</span><span class=\"pl-s1\">message</span><span class=\"pl-kos\">]</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-en\">deepEqual</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">actual</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">expected</span><span class=\"pl-kos\">,</span> <span class=\"pl-kos\">[</span><span class=\"pl-s1\">message</span><span class=\"pl-kos\">]</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-en\">notDeepEqual</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">actual</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">expected</span><span class=\"pl-kos\">,</span> <span class=\"pl-kos\">[</span><span class=\"pl-s1\">message</span><span class=\"pl-kos\">]</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-en\">strictEqual</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">actual</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">expected</span><span class=\"pl-kos\">,</span> <span class=\"pl-kos\">[</span><span class=\"pl-s1\">message</span><span class=\"pl-kos\">]</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-en\">notStrictEqual</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">actual</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">expected</span><span class=\"pl-kos\">,</span> <span class=\"pl-kos\">[</span><span class=\"pl-s1\">message</span><span class=\"pl-kos\">]</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-en\">throws</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">block</span><span class=\"pl-kos\">,</span> <span class=\"pl-kos\">[</span><span class=\"pl-s1\">expected</span><span class=\"pl-kos\">]</span><span class=\"pl-kos\">,</span> <span class=\"pl-kos\">[</span><span class=\"pl-s1\">message</span><span class=\"pl-kos\">]</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Test Suite Convenience Methods Reference (See <a href=\"https://github.com/jquery/jquery/blob/main/test/data/testinit.js\">test/data/testinit.js</a>)</h2><a id=\"user-content-test-suite-convenience-methods-reference-see-testdatatestinitjs\" class=\"anchor\" aria-label=\"Permalink: Test Suite Convenience Methods Reference (See test/data/testinit.js)\" href=\"#test-suite-convenience-methods-reference-see-testdatatestinitjs\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Returns an array of elements with the given IDs</h3><a id=\"user-content-returns-an-array-of-elements-with-the-given-ids\" class=\"anchor\" aria-label=\"Permalink: Returns an array of elements with the given IDs\" href=\"#returns-an-array-of-elements-with-the-given-ids\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"q( ... );\"><pre><span class=\"pl-en\">q</span><span class=\"pl-kos\">(</span> ... <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span></pre></div>\n<p dir=\"auto\">Example:</p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"q(&quot;main&quot;, &quot;foo&quot;, &quot;bar&quot;);\n\n=&gt; [ div#main, span#foo, input#bar ]\"><pre><span class=\"pl-en\">q</span><span class=\"pl-kos\">(</span><span class=\"pl-s\">\"main\"</span><span class=\"pl-kos\">,</span> <span class=\"pl-s\">\"foo\"</span><span class=\"pl-kos\">,</span> <span class=\"pl-s\">\"bar\"</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n\n<span class=\"pl-c1\">=&gt;</span> <span class=\"pl-kos\">[</span> <span class=\"pl-s1\">div</span>#<span class=\"pl-s1\">main</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">span</span>#<span class=\"pl-s1\">foo</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">input</span>#<span class=\"pl-s1\">bar</span> <span class=\"pl-kos\">]</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Asserts that a selection matches the given IDs</h3><a id=\"user-content-asserts-that-a-selection-matches-the-given-ids\" class=\"anchor\" aria-label=\"Permalink: Asserts that a selection matches the given IDs\" href=\"#asserts-that-a-selection-matches-the-given-ids\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"t( testName, selector, [ &quot;array&quot;, &quot;of&quot;, &quot;ids&quot; ] );\"><pre><span class=\"pl-en\">t</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">testName</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">selector</span><span class=\"pl-kos\">,</span> <span class=\"pl-kos\">[</span> <span class=\"pl-s\">\"array\"</span><span class=\"pl-kos\">,</span> <span class=\"pl-s\">\"of\"</span><span class=\"pl-kos\">,</span> <span class=\"pl-s\">\"ids\"</span> <span class=\"pl-kos\">]</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span></pre></div>\n<p dir=\"auto\">Example:</p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"t(&quot;Check for something&quot;, &quot;//[a]&quot;, [&quot;foo&quot;, &quot;bar&quot;]);\"><pre><span class=\"pl-en\">t</span><span class=\"pl-kos\">(</span><span class=\"pl-s\">\"Check for something\"</span><span class=\"pl-kos\">,</span> <span class=\"pl-s\">\"//[a]\"</span><span class=\"pl-kos\">,</span> <span class=\"pl-kos\">[</span><span class=\"pl-s\">\"foo\"</span><span class=\"pl-kos\">,</span> <span class=\"pl-s\">\"bar\"</span><span class=\"pl-kos\">]</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Fires a native DOM event without going through jQuery</h3><a id=\"user-content-fires-a-native-dom-event-without-going-through-jquery\" class=\"anchor\" aria-label=\"Permalink: Fires a native DOM event without going through jQuery\" href=\"#fires-a-native-dom-event-without-going-through-jquery\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"fireNative( node, eventType )\"><pre><span class=\"pl-en\">fireNative</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">node</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">eventType</span> <span class=\"pl-kos\">)</span></pre></div>\n<p dir=\"auto\">Example:</p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"fireNative( jQuery(&quot;#elem&quot;)[0], &quot;click&quot; );\"><pre><span class=\"pl-en\">fireNative</span><span class=\"pl-kos\">(</span> <span class=\"pl-en\">jQuery</span><span class=\"pl-kos\">(</span><span class=\"pl-s\">\"#elem\"</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">[</span><span class=\"pl-c1\">0</span><span class=\"pl-kos\">]</span><span class=\"pl-kos\">,</span> <span class=\"pl-s\">\"click\"</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Add random number to url to stop caching</h3><a id=\"user-content-add-random-number-to-url-to-stop-caching\" class=\"anchor\" aria-label=\"Permalink: Add random number to url to stop caching\" href=\"#add-random-number-to-url-to-stop-caching\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"url( &quot;some/url&quot; );\"><pre><span class=\"pl-en\">url</span><span class=\"pl-kos\">(</span> <span class=\"pl-s\">\"some/url\"</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span></pre></div>\n<p dir=\"auto\">Example:</p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"url(&quot;index.html&quot;);\n\n=&gt; &quot;data/index.html?10538358428943&quot;\n\n\nurl(&quot;mock.php?foo=bar&quot;);\n\n=&gt; &quot;data/mock.php?foo=bar&amp;10538358345554&quot;\"><pre><span class=\"pl-en\">url</span><span class=\"pl-kos\">(</span><span class=\"pl-s\">\"index.html\"</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n\n<span class=\"pl-c1\">=&gt;</span> <span class=\"pl-s\">\"data/index.html?10538358428943\"</span>\n\n\n<span class=\"pl-en\">url</span><span class=\"pl-kos\">(</span><span class=\"pl-s\">\"mock.php?foo=bar\"</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n\n<span class=\"pl-c1\">=&gt;</span> <span class=\"pl-s\">\"data/mock.php?foo=bar&amp;10538358345554\"</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Run tests in an iframe</h3><a id=\"user-content-run-tests-in-an-iframe\" class=\"anchor\" aria-label=\"Permalink: Run tests in an iframe\" href=\"#run-tests-in-an-iframe\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">Some tests may require a document other than the standard test fixture, and\nthese can be run in a separate iframe. The actual test code and assertions\nremain in jQuery's main test files; only the minimal test fixture markup\nand setup code should be placed in the iframe file.</p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"testIframe( testName, fileName,\n function testCallback(\n assert, jQuery, window, document,\n\t [ additional args ] ) {\n\t...\n } );\"><pre><span class=\"pl-en\">testIframe</span><span class=\"pl-kos\">(</span> <span class=\"pl-s1\">testName</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">fileName</span><span class=\"pl-kos\">,</span>\n <span class=\"pl-k\">function</span> <span class=\"pl-en\">testCallback</span><span class=\"pl-kos\">(</span>\n <span class=\"pl-s1\">assert</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">jQuery</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">window</span><span class=\"pl-kos\">,</span> <span class=\"pl-s1\">document</span><span class=\"pl-kos\">,</span>\n\t <span class=\"pl-kos\">[</span> <span class=\"pl-s1\">additional</span> <span class=\"pl-s1\">args</span> <span class=\"pl-kos\">]</span> <span class=\"pl-kos\">)</span> <span class=\"pl-kos\">{</span>\n\t...\n <span class=\"pl-kos\">}</span> <span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span></pre></div>\n<p dir=\"auto\">This loads a page, constructing a url with fileName <code>\"./data/\" + fileName</code>.\nThe iframed page determines when the callback occurs in the test by\nincluding the \"/test/data/iframeTest.js\" script and calling\n<code>startIframeTest( [ additional args ] )</code> when appropriate. Often this\nwill be after either document ready or <code>window.onload</code> fires.</p>\n<p dir=\"auto\">The <code>testCallback</code> receives the QUnit <code>assert</code> object created by <code>testIframe</code>\nfor this test, followed by the global <code>jQuery</code>, <code>window</code>, and <code>document</code> from\nthe iframe. If the iframe code passes any arguments to <code>startIframeTest</code>,\nthey follow the <code>document</code> argument.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Questions?</h2><a id=\"user-content-questions\" class=\"anchor\" aria-label=\"Permalink: Questions?\" href=\"#questions\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">If you have any questions, please feel free to ask on the\n<a href=\"https://forum.jquery.com/developing-jquery-core\" rel=\"nofollow\">Developing jQuery Core forum</a> or in #jquery on <a href=\"https://web.libera.chat/\" rel=\"nofollow\">libera</a>.</p>\n</article>",
"loaded": true,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": [
{
"level": 1,
"text": "jQuery — New Wave JavaScript",
"anchor": "jquery--new-wave-javascript",
"htmlText": "jQuery — New Wave JavaScript"
},
{
"level": 2,
"text": "Contribution Guides",
"anchor": "contribution-guides",
"htmlText": "Contribution Guides"
},
{
"level": 3,
"text": "References to issues/PRs",
"anchor": "references-to-issuesprs",
"htmlText": "References to issues/PRs"
},
{
"level": 2,
"text": "Environments in which to use jQuery",
"anchor": "environments-in-which-to-use-jquery",
"htmlText": "Environments in which to use jQuery"
},
{
"level": 2,
"text": "What you need to build your own jQuery",
"anchor": "what-you-need-to-build-your-own-jquery",
"htmlText": "What you need to build your own jQuery"
},
{
"level": 2,
"text": "How to build your own jQuery",
"anchor": "how-to-build-your-own-jquery",
"htmlText": "How to build your own jQuery"
},
{
"level": 2,
"text": "Build all jQuery release files",
"anchor": "build-all-jquery-release-files",
"htmlText": "Build all jQuery release files"
},
{
"level": 2,
"text": "Building a Custom jQuery",
"anchor": "building-a-custom-jquery",
"htmlText": "Building a Custom jQuery"
},
{
"level": 3,
"text": "Build Script Help",
"anchor": "build-script-help",
"htmlText": "Build Script Help"
},
{
"level": 3,
"text": "Modules",
"anchor": "modules",
"htmlText": "Modules"
},
{
"level": 5,
"text": "AMD name",
"anchor": "amd-name",
"htmlText": "AMD name"
},
{
"level": 5,
"text": "File name and directory",
"anchor": "file-name-and-directory",
"htmlText": "File name and directory"
},
{
"level": 5,
"text": "ECMAScript Module (ESM) mode",
"anchor": "ecmascript-module-esm-mode",
"htmlText": "ECMAScript Module (ESM) mode"
},
{
"level": 5,
"text": "Factory mode",
"anchor": "factory-mode",
"htmlText": "Factory mode"
},
{
"level": 4,
"text": "Custom Build Examples",
"anchor": "custom-build-examples",
"htmlText": "Custom Build Examples"
},
{
"level": 2,
"text": "Running the Unit Tests",
"anchor": "running-the-unit-tests",
"htmlText": "Running the Unit Tests"
},
{
"level": 2,
"text": "Essential Git",
"anchor": "essential-git",
"htmlText": "Essential Git"
},
{
"level": 3,
"text": "Cleaning",
"anchor": "cleaning",
"htmlText": "Cleaning"
},
{
"level": 3,
"text": "Rebasing",
"anchor": "rebasing",
"htmlText": "Rebasing"
},
{
"level": 3,
"text": "Handling merge conflicts",
"anchor": "handling-merge-conflicts",
"htmlText": "Handling merge conflicts"
},
{
"level": 2,
"text": "QUnit Reference",
"anchor": "qunit-reference",
"htmlText": "QUnit Reference"
},
{
"level": 3,
"text": "Test methods",
"anchor": "test-methods",
"htmlText": "Test methods"
},
{
"level": 3,
"text": "Test assertions",
"anchor": "test-assertions",
"htmlText": "Test assertions"
},
{
"level": 2,
"text": "Test Suite Convenience Methods Reference (See test/data/testinit.js)",
"anchor": "test-suite-convenience-methods-reference-see-testdatatestinitjs",
"htmlText": "Test Suite Convenience Methods Reference (See test/data/testinit.js)"
},
{
"level": 3,
"text": "Returns an array of elements with the given IDs",
"anchor": "returns-an-array-of-elements-with-the-given-ids",
"htmlText": "Returns an array of elements with the given IDs"
},
{
"level": 3,
"text": "Asserts that a selection matches the given IDs",
"anchor": "asserts-that-a-selection-matches-the-given-ids",
"htmlText": "Asserts that a selection matches the given IDs"
},
{
"level": 3,
"text": "Fires a native DOM event without going through jQuery",
"anchor": "fires-a-native-dom-event-without-going-through-jquery",
"htmlText": "Fires a native DOM event without going through jQuery"
},
{
"level": 3,
"text": "Add random number to url to stop caching",
"anchor": "add-random-number-to-url-to-stop-caching",
"htmlText": "Add random number to url to stop caching"
},
{
"level": 3,
"text": "Run tests in an iframe",
"anchor": "run-tests-in-an-iframe",
"htmlText": "Run tests in an iframe"
},
{
"level": 2,
"text": "Questions?",
"anchor": "questions",
"htmlText": "Questions?"
}
],
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Fjquery%2Fjquery"
}
},
{
"displayName": "CODE_OF_CONDUCT.md",
"repoName": "jquery",
"refName": "main",
"path": "CODE_OF_CONDUCT.md",
"preferredFileType": "code_of_conduct",
"tabName": "Code of conduct",
"richText": null,
"loaded": false,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": null,
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Fjquery%2Fjquery"
}
},
{
"displayName": "LICENSE.txt",
"repoName": "jquery",
"refName": "main",
"path": "LICENSE.txt",
"preferredFileType": "license",
"tabName": "MIT",
"richText": null,
"loaded": false,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": null,
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Fjquery%2Fjquery"
}
},
{
"displayName": "SECURITY.md",
"repoName": "jquery",
"refName": "main",
"path": "SECURITY.md",
"preferredFileType": "security",
"tabName": "Security",
"richText": null,
"loaded": false,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": null,
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Fjquery%2Fjquery"
}
}
],
"overviewFilesProcessingTime": 0
}
},
"appPayload": {
"helpUrl": "https://docs.github.com",
"findFileWorkerPath": "/assets-cdn/worker/find-file-worker-1583894afd38.js",
"findInFileWorkerPath": "/assets-cdn/worker/find-in-file-worker-3a63a487027b.js",
"githubDevUrl": null,
"enabled_features": {
"code_nav_ui_events": false,
"overview_shared_code_dropdown_button": false,
"react_blob_overlay": false,
"copilot_conversational_ux_embedding_update": false,
"copilot_smell_icebreaker_ux": true,
"copilot_workspace": false
}
}
}
}
{
"accept-ranges": "bytes",
"cache-control": "max-age=0, private, must-revalidate",
"content-encoding": "gzip",
"content-security-policy": "default-src 'none'; base-uri 'self'; child-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com api.githubcopilot.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com/v1/engines/github-completion/completions proxy.enterprise.githubcopilot.com/v1/engines/github-completion/completions *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/",
"content-type": "text/html; charset=utf-8",
"date": "Sat, 27 Jul 2024 07:58:45 GMT",
"etag": "a6100fc86dffba2a3cde2eb38b333c09",
"referrer-policy": "no-referrer-when-downgrade",
"server": "GitHub.com",
"set-cookie": "logged_in=no; Path=/; Domain=github.com; Expires=Sun, 27 Jul 2025 07:58:44 GMT; HttpOnly; Secure; SameSite=Lax",
"strict-transport-security": "max-age=31536000; includeSubdomains; preload",
"transfer-encoding": "chunked",
"vary": "X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With",
"x-content-type-options": "nosniff",
"x-frame-options": "deny",
"x-github-request-id": "8A68:D325:F93C35:13F949D:66A4A8B3",
"x-xss-protection": "0"
}