Skip to content

Commit ebde1c3

Browse files
committed
deploy: f67fcdc
1 parent bd2bc6c commit ebde1c3

218 files changed

Lines changed: 58334 additions & 12958 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dist/jquery/AUTHORS.txt

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Authors ordered by first contribution.
2+
13
John Resig <jeresig@gmail.com>
24
Gilles van den Hoven <gilles0181@gmail.com>
35
Michael Geary <mike@geary.com>
@@ -29,7 +31,6 @@ Michael Bensoussan <mickey@seesmic.com>
2931
Louis-Rémi Babé <lrbabe@gmail.com>
3032
Robert Katić <robert.katic@gmail.com>
3133
Damian Janowski <damian.janowski@gmail.com>
32-
Anton Kovalyov <anton@kovalyov.net>
3334
Dušan B. Jovanovic <dbjdbj@gmail.com>
3435
Earle Castledine <mrspeaker@gmail.com>
3536
Rich Dougherty <rich@rd.gen.nz>
@@ -67,11 +68,11 @@ temp01 <temp01irc@gmail.com>
6768
Colin Snover <github.com@zetafleet.com>
6869
Jared Grippe <jared@deadlyicon.com>
6970
Ryan W Tenney <ryan@10e.us>
70-
Alex Sexton <AlexSexton@gmail.com>
7171
Pinhook <contact@pinhooklabs.com>
7272
Ron Otten <r.j.g.otten@gmail.com>
7373
Jephte Clain <Jephte.Clain@univ-reunion.fr>
7474
Anton Matzneller <obhvsbypqghgc@gmail.com>
75+
Alex Sexton <AlexSexton@gmail.com>
7576
Dan Heberden <danheberden@gmail.com>
7677
Henri Wiechers <hwiechers@gmail.com>
7778
Russell Holbrook <russell.holbrook@patch.com>
@@ -85,9 +86,10 @@ Sylvester Keil <sylvester@keil.or.at>
8586
Brandon Sterne <bsterne@mozilla.com>
8687
Mathias Bynens <mathias@qiwi.be>
8788
Lee Carpenter <elcarpie@gmail.com>
88-
Timmy Willison <4timmywil@gmail.com>
89+
Timmy Willison <timmywil@users.noreply.github.com>
8990
Corey Frang <gnarf37@gmail.com>
9091
Digitalxero <digitalxero>
92+
Anton Kovalyov <anton@kovalyov.net>
9193
David Murdoch <david@davidmurdoch.com>
9294
Josh Varner <josh.varner@gmail.com>
9395
Charles McNulty <cmcnulty@kznf.com>
@@ -109,7 +111,7 @@ Mike Sherov <mike.sherov@gmail.com>
109111
Greg Hazel <ghazel@gmail.com>
110112
Schalk Neethling <schalk@ossreleasefeed.com>
111113
Denis Knauf <Denis.Knauf@gmail.com>
112-
Timo Tijhof <krinklemail@gmail.com>
114+
Timo Tijhof <krinkle@fastmail.com>
113115
Steen Nielsen <swinedk@gmail.com>
114116
Anton Ryzhov <anton@ryzhov.me>
115117
Shi Chuan <shichuanr@gmail.com>
@@ -149,7 +151,6 @@ Chris Faulkner <thefaulkner@gmail.com>
149151
Marcel Greter <marcel.greter@ocbnet.ch>
150152
Elijah Manor <elijah.manor@gmail.com>
151153
Daniel Chatfield <chatfielddaniel@gmail.com>
152-
Daniel Gálvez <dgalvez@editablething.com>
153154
Nikita Govorov <nikita.govorov@gmail.com>
154155
Wesley Walser <waw325@gmail.com>
155156
Mike Pennisi <mike@mikepennisi.com>
@@ -160,9 +161,7 @@ Dave Riddle <david@joyvuu.com>
160161
Callum Macrae <callum@lynxphp.com>
161162
Jonathan Sampson <jjdsampson@gmail.com>
162163
Benjamin Truyman <bentruyman@gmail.com>
163-
Jay Merrifield <fracmak@gmail.com>
164164
James Huston <james@jameshuston.net>
165-
Sai Lung Wong <sai.wong@huffingtonpost.com>
166165
Erick Ruiz de Chávez <erickrdch@gmail.com>
167166
David Bonner <dbonner@cogolabs.com>
168167
Allen J Schmidt Jr <cobrasoft@gmail.com>
@@ -172,8 +171,11 @@ Ismail Khair <ismail.khair@gmail.com>
172171
Carl Danley <carldanley@gmail.com>
173172
Mike Petrovich <michael.c.petrovich@gmail.com>
174173
Greg Lavallee <greglavallee@wapolabs.com>
174+
Daniel Gálvez <dgalvez@editablething.com>
175+
Sai Lung Wong <sai.wong@huffingtonpost.com>
175176
Tom H Fuertes <TomFuertes@gmail.com>
176177
Roland Eckl <eckl.roland@googlemail.com>
178+
Jay Merrifield <fracmak@gmail.com>
177179
Yiming He <yiminghe@gmail.com>
178180
David Fox <dfoxinator@gmail.com>
179181
Bennett Sorbo <bsorbo@gmail.com>
@@ -183,26 +185,23 @@ Sebastian Burkhard <sebi.burkhard@gmail.com>
183185
Zachary Adam Kaplan <razic@viralkitty.com>
184186
Adam Coulombe <me@adam.co>
185187
nanto_vi <nanto@moon.email.ne.jp>
186-
nanto <nanto@moon.email.ne.jp>
187188
Danil Somsikov <danilasomsikov@gmail.com>
188189
Ryunosuke SATO <tricknotes.rs@gmail.com>
189190
Diego Tres <diegotres@gmail.com>
190191
Jean Boussier <jean.boussier@gmail.com>
191192
Andrew Plummer <plummer.andrew@gmail.com>
192193
Mark Raddatz <mraddatz@gmail.com>
193-
Pascal Borreli <pascal@borreli.com>
194194
Isaac Z. Schlueter <i@izs.me>
195195
Karl Sieburg <ksieburg@yahoo.com>
196+
Pascal Borreli <pascal@borreli.com>
196197
Nguyen Phuc Lam <ruado1987@gmail.com>
197198
Dmitry Gusev <dmitry.gusev@gmail.com>
198199
Steven Benner <admin@stevenbenner.com>
199200
Li Xudong <istonelee@gmail.com>
200201
Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
201202
Renato Oliveira dos Santos <ros3@cin.ufpe.br>
202203
Frederic Junod <frederic.junod@camptocamp.com>
203-
Tom H Fuertes <tomfuertes@gmail.com>
204204
Mitch Foley <mitch@thefoley.net>
205-
ros3cin <ros3@cin.ufpe.br>
206205
Kyle Robinson Young <kyle@dontkry.com>
207206
John Paul <john@johnkpaul.com>
208207
Jason Bedard <jason+jquery@jbedard.ca>
@@ -248,7 +247,6 @@ Dan Hart <danhart@notonthehighstreet.com>
248247
Nazar Mokrynskyi <nazar@mokrynskyi.com>
249248
Benjamin Tan <demoneaux@gmail.com>
250249
Amit Merchant <bullredeyes@gmail.com>
251-
Jason Bedard <jason+github@jbedard.ca>
252250
Veaceslav Grimalschi <grimalschi@yandex.ru>
253251
Richard McDaniel <rm0026@uah.edu>
254252
Arthur Verschaeve <contact@arthurverschaeve.be>
@@ -271,12 +269,12 @@ Jon Hester <jon.d.hester@gmail.com>
271269
Colin Frick <colin@bash.li>
272270
Winston Howes <winstonhowes@gmail.com>
273271
Alexander O'Mara <me@alexomara.com>
274-
Chris Rebert <github@rebertia.com>
275272
Bastian Buchholz <buchholz.bastian@googlemail.com>
276273
Mu Haibao <mhbseal@163.com>
277274
Calvin Metcalf <calvin.metcalf@gmail.com>
278275
Arthur Stolyar <nekr.fabula@gmail.com>
279276
Gabriel Schulhof <gabriel.schulhof@intel.com>
277+
Chris Rebert <github@rebertia.com>
280278
Gilad Peleg <giladp007@gmail.com>
281279
Julian Alexander Murillo <julian.alexander.murillo@gmail.com>
282280
Kevin Kirsche <Kev.Kirsche+GitHub@gmail.com>
@@ -295,15 +293,14 @@ Christian Grete <webmaster@christiangrete.com>
295293
Tom von Clef <thomas.vonclef@gmail.com>
296294
Liza Ramo <liza.h.ramo@gmail.com>
297295
Joelle Fleurantin <joasqueeniebee@gmail.com>
298-
Steve Mao <maochenyan@gmail.com>
299296
Jon Dufresne <jon.dufresne@gmail.com>
300297
Jae Sung Park <alberto.park@gmail.com>
301298
Josh Soref <apache@soref.com>
302-
Saptak Sengupta <saptak013@gmail.com>
303299
Henry Wong <henryw4k@gmail.com>
304300
Jun Sun <klsforever@gmail.com>
305301
Martijn W. van der Lee <martijn@vanderlee.com>
306302
Devin Wilson <dwilson6.github@gmail.com>
303+
Steve Mao <maochenyan@gmail.com>
307304
Damian Senn <jquery@topaxi.codes>
308305
Zack Hall <zackhall@outlook.com>
309306
Vitaliy Terziev <vitaliyterziev@gmail.com>
@@ -334,38 +331,46 @@ Jordan Beland <jordan.beland@gmail.com>
334331
Henry Zhu <hi@henryzoo.com>
335332
Nilton Cesar <niltoncms@gmail.com>
336333
basil.belokon <basil.belokon@gmail.com>
334+
Saptak Sengupta <saptak013@gmail.com>
337335
Andrey Meshkov <ay.meshkov@gmail.com>
338336
tmybr11 <tomas.perone@gmail.com>
339337
Luis Emilio Velasco Sanchez <emibloque@gmail.com>
340-
Ed S <ejsanders@gmail.com>
338+
Ed Sanders <ejsanders@gmail.com>
341339
Bert Zhang <enbo@users.noreply.github.com>
342340
Sébastien Règne <regseb@users.noreply.github.com>
343341
wartmanm <3869625+wartmanm@users.noreply.github.com>
344342
Siddharth Dungarwal <sd5869@gmail.com>
345-
abnud1 <ahmad13932013@hotmail.com>
346343
Andrei Fangli <andrei_fangli@outlook.com>
347344
Marja Hölttä <marja.holtta@gmail.com>
345+
abnud1 <ahmad13932013@hotmail.com>
348346
buddh4 <mail@jharrer.de>
349347
Hoang <dangkyokhoang@gmail.com>
348+
Sean Robinson <sean.robinson@scottsdalecc.edu>
350349
Wonseop Kim <wonseop.kim@samsung.com>
351350
Pat O'Callaghan <patocallaghan@gmail.com>
352351
JuanMa Ruiz <ruizjuanma@gmail.com>
353352
Ahmed.S.ElAfifi <ahmed.s.elafifi@gmail.com>
354353
Christian Oliff <christianoliff@pm.me>
355354
Christian Wenz <christian@wenz.org>
356-
Sean Robinson <sean.robinson@scottsdalecc.edu>
357355
Jonathan <vanillajonathan@users.noreply.github.com>
358356
Pierre Grimaud <grimaud.pierre@gmail.com>
359357
Beatriz Rezener <beatrizrezener@users.noreply.github.com>
360-
Natalia Sroka <37873210+natipo@users.noreply.github.com>
358+
Necmettin Karakaya <necmettin.karakaya@gmail.com>
361359
Wonhyoung Park <wh05.park@samsung.com>
362360
Dallas Fraser <dallas.fraser.waterloo@gmail.com>
361+
高灰 <www@zeroplace.cn>
363362
fecore1 <89127124+fecore1@users.noreply.github.com>
364363
ygj6 <7699524+ygj6@users.noreply.github.com>
364+
Bruno PIERRE <brunopierre4@yahoo.fr>
365365
Simon Legner <Simon.Legner@gmail.com>
366-
Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
366+
Baoshuo Ren <i@baoshuo.ren>
367367
Anders Kaseorg <andersk@mit.edu>
368368
Alex <aleksandrosansan@gmail.com>
369-
Timo Tijhof <krinkle@fastmail.com>
370369
Gabriela Gutierrez <gabigutierrez@google.com>
371370
Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com>
371+
J.Son <x@x-wx.com>
372+
Liam James <liam@minimaximize.com>
373+
ac-mmi <79802170+ac-mmi@users.noreply.github.com>
374+
neogy-akash <AKASHNEOGY400@GMAIL.COM>
375+
studystill <137779852+studystill@users.noreply.github.com>
376+
Ulises Gascón <ulisesgascongonzalez@gmail.com>

dist/jquery/README.md

Lines changed: 136 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
For information on how to get started and how to use jQuery, please see [jQuery's documentation](https://api.jquery.com/).
66
For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery).
77

8-
If upgrading, please see the [blog post for 3.7.1](https://blog.jquery.com/2023/08/28/jquery-3-7-1-released-reliable-table-row-dimensions/). This includes notable differences from the previous version and a more readable changelog.
8+
If upgrading, please see the [blog post for 4.0.0](https://blog.jquery.com/2026/01/17/jquery-4-0-0/). This includes notable differences from the previous version and a more readable changelog.
99

1010
## Including jQuery
1111

@@ -16,24 +16,133 @@ Below are some of the most common ways to include jQuery.
1616
#### Script tag
1717

1818
```html
19-
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
19+
<script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
2020
```
2121

22-
#### Webpack / Browserify / Babel
22+
or, to use the jQuery ECMAScript module:
2323

24-
There are several ways to use [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/) or [Babel](https://babeljs.io/). For more information on using these tools, please refer to the corresponding project's documentation. In the script, including jQuery will usually look like this:
24+
```html
25+
<script type="module">
26+
import { $ } from "https://code.jquery.com/jquery-4.0.0.module.min.js";
27+
</script>
28+
```
29+
30+
or:
31+
32+
```html
33+
<script type="module">
34+
import { jQuery } from "https://code.jquery.com/jquery-4.0.0.module.min.js";
35+
</script>
36+
```
37+
38+
All jQuery modules export named `$` & `jQuery` tokens; the further examples will just show `$`. The default import also works:
39+
40+
```html
41+
<script type="module">
42+
import $ from "https://code.jquery.com/jquery-4.0.0.module.min.js";
43+
</script>
44+
```
45+
46+
However, named imports provide better interoperability across tooling and are therefore recommended.
47+
48+
Sometimes you don’t need AJAX, or you prefer to use one of the many standalone libraries that focus on AJAX requests. And often it is simpler to use a combination of CSS, class manipulation or the Web Animations API. Similarly, many projects opt into relying on native browser promises instead of jQuery Deferreds. Along with the regular version of jQuery that includes the `ajax`, `callbacks`, `deferred`, `effects` & `queue` modules, we’ve released a “slim” version that excludes these modules. You can load it as a regular script:
49+
50+
```html
51+
<script src="https://code.jquery.com/jquery-4.0.0.slim.min.js"></script>
52+
```
53+
54+
or as a module:
55+
56+
```html
57+
<script type="module">
58+
import { $ } from "https://code.jquery.com/jquery-4.0.0.module.slim.min.js";
59+
</script>
60+
```
61+
62+
#### Import maps
63+
64+
To avoid repeating long import paths that change on each jQuery release, you can use import maps - they are now supported in every modern browser. Put the following script tag before any `<script type="module">`:
65+
66+
```html
67+
<script type="importmap">
68+
{
69+
"imports": {
70+
"jquery": "https://code.jquery.com/jquery-4.0.0.module.min.js",
71+
"jquery/slim": "https://code.jquery.com/jquery-4.0.0.module.slim.min.js"
72+
}
73+
}
74+
</script>
75+
```
76+
77+
Now, the following will work to get the full version:
78+
79+
```html
80+
<script type="module">
81+
import { $ } from "jquery";
82+
// Use $ here
83+
</script>
84+
```
85+
86+
and the following to get the slim one:
87+
88+
```html
89+
<script type="module">
90+
import { $ } from "jquery/slim";
91+
// Use $ here
92+
</script>
93+
```
94+
95+
The advantage of these specific mappings is they match the ones embedded in the jQuery npm package, providing better interoperability between the environments.
96+
97+
You can also use jQuery from npm even in the browser setup. Read along for more details.
98+
99+
### Using jQuery from npm
100+
101+
There are several ways to use jQuery from npm. One is to use a build tool like [Webpack](https://webpack.js.org/), [Browserify](https://browserify.org/) or [Babel](https://babeljs.io/). For more information on using these tools, please refer to the corresponding project's documentation.
102+
103+
Another way is to use jQuery directly in Node.js. See the [Node.js pre-requisites](#nodejs-pre-requisites) section for more details on the Node.js-specific part of this.
104+
105+
To install the jQuery npm package, invoke:
106+
107+
```sh
108+
npm install jquery
109+
```
110+
111+
In the script, including jQuery will usually look like this:
25112

26113
```js
27-
import $ from "jquery";
114+
import { $ } from "jquery";
28115
```
29116

30117
If you need to use jQuery in a file that's not an ECMAScript module, you can use the CommonJS syntax:
31118

32119
```js
33-
var $ = require( "jquery" );
120+
const $ = require( "jquery" );
34121
```
35122

36-
#### AMD (Asynchronous Module Definition)
123+
The CommonJS module _does not_ expose named `$` & `jQuery` exports.
124+
125+
#### Individual modules
126+
127+
jQuery is authored in ECMAScript modules; it's also possible to use them directly. They are contained in the `src/` folder; inspect the package contents to see what's there. Full file names are required, including the `.js` extension.
128+
129+
Be aware that this is an advanced & low-level interface, and we don't consider it stable, even between minor or patch releases - this is especially the case for modules in subdirectories or `src/`. If you rely on it, verify your setup before updating jQuery.
130+
131+
All top-level modules, i.e. files directly in the `src/` directory export jQuery. Importing multiple modules will all attach to the same jQuery instance.
132+
133+
Remember that some modules have other dependencies (e.g. the `event` module depends on the `selector` one) so in some cases you may get more than you expect.
134+
135+
Example usage:
136+
137+
```js
138+
import { $ } from "jquery/src/css.js"; // adds the `.css()` method
139+
import "jquery/src/event.js"; // adds the `.on()` method; pulls "selector" as a dependency
140+
$( ".toggle" ).on( "click", function() {
141+
$( this ).css( "color", "red" );
142+
} );
143+
```
144+
145+
### AMD (Asynchronous Module Definition)
37146

38147
AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](https://requirejs.org/docs/whyamd.html).
39148

@@ -43,18 +152,32 @@ define( [ "jquery" ], function( $ ) {
43152
} );
44153
```
45154

46-
### Node
155+
Node.js doesn't understand AMD natively so this method is mostly used in a browser setup.
47156

48-
To include jQuery in [Node](https://nodejs.org/), first install with npm.
157+
### Node.js pre-requisites
49158

50-
```sh
51-
npm install jquery
159+
For jQuery to work in Node, a `window` with a `document` is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/jsdom/jsdom). This can be useful for testing purposes.
160+
161+
For Node-based environments that don't have a global `window`, jQuery exposes a dedicated `jquery/factory` entry point.
162+
163+
To `import` jQuery using this factory, use the following:
164+
165+
```js
166+
import { JSDOM } from "jsdom";
167+
const { window } = new JSDOM( "" );
168+
import { jQueryFactory } from "jquery/factory";
169+
const $ = jQueryFactory( window );
52170
```
53171

54-
For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/jsdom/jsdom). This can be useful for testing purposes.
172+
or, if you use `require`:
55173

56174
```js
57175
const { JSDOM } = require( "jsdom" );
58176
const { window } = new JSDOM( "" );
59-
const $ = require( "jquery" )( window );
177+
const { jQueryFactory } = require( "jquery/factory" );
178+
const $ = jQueryFactory( window );
60179
```
180+
181+
#### Slim build in Node.js
182+
183+
To use the slim build of jQuery in Node.js, use `"jquery/slim"` instead of `"jquery"` in both `require` or `import` calls above. To use the slim build in Node.js with factory mode, use `jquery/factory-slim` instead of `jquery/factory`.

dist/jquery/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
https://blog.jquery.com/2026/01/17/jquery-4-0-0/
4+
5+
## Release
6+
7+
- remove dist files from main branch ([c838cfb5](https://github.com/jquery/jquery/commit/c838cfb5bb0c6cd17cfaa1dd83aca8d20589de99))

0 commit comments

Comments
 (0)