Jump to content

JQuery/en: Difference between revisions

From mediawiki.org
Content deleted Content added
FuzzyBot (talk | contribs)
Updating to match new version of source page
FuzzyBot (talk | contribs)
Updating to match new version of source page
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages />
<languages />
{{DISPLAYTITLE:jQuery}}
{{DISPLAYTITLE:jQuery{{#translation:}}}}
__NOTOC__
__NOTOC__


Line 7: Line 7:


==Version==
==Version==
{| class="wikitable plainlinks vatop" style="text-align: left;"
{| class="wikitable plainlinks"
|+ MediaWiki versions with the jQuery version used
! style="width: 125px; text-align: left" | MediaWiki
! style="width: 100px; text-align: left" | jQuery
! style="text-align: left" | Notes
|-
|-
! scope="col" | MediaWiki
| <!-- add MW version on newline -->
! scope="col" | jQuery
{{ll|MediaWiki 1.34}}<br/>
! scope="col" | Notes
{{ll|MediaWiki 1.33}}<br/>
{{ll|MediaWiki 1.32}}
|jQuery 3.3.1
|
|-
|-
| {{Plainlist|
| <!-- add MW version on newline -->
{{ll|MediaWiki 1.31}}<br/>
* {{ll|MediaWiki 1.45}}
{{ll|MediaWiki 1.30}}<br/>
* {{ll|MediaWiki 1.44}}
{{ll|MediaWiki 1.29}}
* {{ll|MediaWiki 1.43}}
* {{ll|MediaWiki 1.42}}
* {{ll|MediaWiki 1.41}}
* {{ll|MediaWiki 1.40}}}}
|jQuery 3.7.1
|{{git|I144069ce80127692b5c0ff91c4e55383f4013e2f}}
|-
| {{ll|MediaWiki 1.39}}
|jQuery 3.6.1
|{{git|Ic67517cc8abe683697a0e631d0ff449eaa6e24ea}}
|- style="vertical-align: top"
| {{plainlist|
* {{ll|MediaWiki 1.38}}
* {{ll|MediaWiki 1.37}}
* {{ll|MediaWiki 1.36}}}}
| jQuery 3.6.0
| Including jQuery Migrate v3.3.2
|- style="vertical-align: top"
| {{plainlist|
* {{ll|MediaWiki 1.35}}
* {{ll|MediaWiki 1.34}}
}}
| jQuery 3.4.1
| Including jQuery Migrate v3.1.0
|- style="vertical-align: top"
| {{plainlist|
* {{ll|MediaWiki 1.33}}
* {{ll|MediaWiki 1.32}}
}}
|jQuery 3.3.1
| Including jQuery Migrate v3.0.1
|- style="vertical-align: top"
| {{plainlist|
* {{ll|MediaWiki 1.31}}
* {{ll|MediaWiki 1.30}}
* {{ll|MediaWiki 1.29}}
}}
|jQuery 3.2.1
|jQuery 3.2.1
|Including jQuery Migrate v3.0.0. See also {{ll|Manual:$wgUsejQueryThree|$wgUsejQueryThree}} (removed in MW 1.31) and {{task|T124742}}.
| Including jQuery Migrate v3.0.0. See also {{ll|Manual:$wgUsejQueryThree|$wgUsejQueryThree}} (removed in MW 1.31) and {{task|T124742}}.
|- style="vertical-align: top"
|-
| {{plainlist|
|
{{ll|MediaWiki 1.28}}<br/>
* {{ll|MediaWiki 1.28}}
{{ll|MediaWiki 1.27}}<br/>
* {{ll|MediaWiki 1.27}}
{{ll|MediaWiki 1.26}}<br/>
* {{ll|MediaWiki 1.26}}
{{ll|MediaWiki 1.25}}<br/>
* {{ll|MediaWiki 1.25}}
{{ll|MediaWiki 1.24|MediaWiki 1.24.3}}
* {{ll|MediaWiki 1.24|MediaWiki 1.24.3}}
}}
| jQuery 1.11.3
| jQuery 1.11.3
| {{git|d898e80fc5933172e5ed48bd53001591727666cc}}, {{git|acfa9695}}
| {{git|d898e80fc5933172e5ed48bd53001591727666cc}}, {{git|acfa9695}}
|- style="vertical-align: top"
|-
| {{ll|MediaWiki 1.24|MediaWiki 1.24.2}}
| {{ll|MediaWiki 1.24|MediaWiki 1.24.2}}
| jQuery 1.11.2
| jQuery 1.11.2
|
|
|- style="vertical-align: top"
|-
| {{ll|MediaWiki 1.24}}
| {{ll|MediaWiki 1.24}}
| jQuery 1.11.1
| jQuery 1.11.1
| with jQuery Migrate {{git|e5502d1ffabab7784d85d}}, {{git|63c3650665313eede9d5f68c473bbc9c28e234d1}}, {{git|8e41082af8aa04d482}}
| with jQuery Migrate {{git|e5502d1ffabab7784d85d}}, {{git|63c3650665313eede9d5f68c473bbc9c28e234d1}}, {{git|8e41082af8aa04d482}}
|- style="vertical-align: top"
|-
| {{plainlist|
| {{ll|MediaWiki 1.23}}<br/>
{{ll|MediaWiki 1.22}}<br/>
* {{ll|MediaWiki 1.23}}
{{ll|MediaWiki 1.21}}
* {{ll|MediaWiki 1.22}}
* {{ll|MediaWiki 1.21}}
}}
| jQuery 1.8.3
| jQuery 1.8.3
|
|
|- style="vertical-align: top"
|-
| {{ll|MediaWiki 1.20}}
| {{ll|MediaWiki 1.20}}
| jQuery 1.8.2
| jQuery 1.8.2
| {{task|T31100}}, {{git|3b85ab0624afe5a53bb60c558f0bef4d6dfb43cd}},<br/>
| {{task|T31100}}, {{git|3b85ab0624afe5a53bb60c558f0bef4d6dfb43cd}},<br/>
{{git|974fa832b4346a61d37250680a3c1e519f2c098b}}, {{git|d6bb1851a7329d66a5904ba27a9ea44687be4658}}
{{git|974fa832b4346a61d37250680a3c1e519f2c098b}}, {{git|d6bb1851a7329d66a5904ba27a9ea44687be4658}}
|- style="vertical-align: top"
|-
| {{ll|MediaWiki 1.19}}
| {{ll|MediaWiki 1.19}}
| jQuery 1.7.1
| jQuery 1.7.1
| {{r|105612}}
| {{r|105612}}
|- style="vertical-align: top"
|-
| {{ll|MediaWiki 1.18}}
| {{ll|MediaWiki 1.18}}
| jQuery 1.6.4
| jQuery 1.6.4
| {{task|T30904}}, {{task|T31773}}<br/>
| {{task|T30904}}, {{task|T31773}}<br/>
{{r|91845}}, {{r|92349}}, {{r|99231}}, {{r|99262}}
{{r|91845}}, {{r|92349}}, {{r|99231}}, {{r|99262}}
|- style="vertical-align: top"
|-
| {{ll|MediaWiki 1.17}}
| {{ll|MediaWiki 1.17}}
| jQuery 1.4.2
| jQuery 1.4.2
| {{r|65962}}
| {{r|65962}}
|- style="vertical-align: top"
|-
| [[MediaWiki 1.16]]
| [[MediaWiki 1.16]]
| jQuery 1.3.2
| jQuery 1.3.2
|
|
|-
|}
|}


Line 77: Line 110:
The plugin jQuery Migrate helps developers to migrate from jQuery 1 to jQuery 3. The tracking task to remove these warnings and improve the underlying code is {{task|T169385}}.
The plugin jQuery Migrate helps developers to migrate from jQuery 1 to jQuery 3. The tracking task to remove these warnings and improve the underlying code is {{task|T169385}}.


Note that the stack traces are available together with the console log in modern browsers, to help locating the origin of the deprecated function.
Note that the stack traces are available together with the console log in modern browsers, to help to locate the origin of the deprecated function.


==ResourceLoader==
==ResourceLoader==
{{MW 1.17|and later}}
{{MW 1.17|and later}}
As of MediaWiki 1.17 all resources are (or should be) loaded through [[Special:MyLanguage/ResourceLoader|ResourceLoader]]. The [[ResourceLoader/Default modules|default modules]] are stored in <code>/resources</code>. There are no static minified versions anymore as ResourceLoader takes care of this when combining and optimizing all queued files.
As of MediaWiki 1.17 all resources are (or should be) loaded through {{ll|ResourceLoader}}.
The [[Special:MyLanguage/ResourceLoader/Core modules|core modules]] are stored in <code>/resources</code>.
There are no static minified versions anymore as ResourceLoader takes care of this when combining and optimizing all queued files.
All code can assume that jQuery has already been loaded.
All code can assume that jQuery has already been loaded.


Line 87: Line 122:


==See also==
==See also==
* {{ll|Upstream projects|Upstream projects}}
* {{ll|Upstream projects|2=Upstream projects}}
* {{ll|Learning JavaScript|Learning JavaScript}}
* {{ll|Learning JavaScript|2=Learning JavaScript}}
*[[Special:MyLanguage/:Category:Snippets with JavaScript|jQuery snippets]]
*[[Special:MyLanguage/Category:Snippets with JavaScript|jQuery snippets]]


==External links==
==External links==


*[https://jquery.com jQuery.com, the official jQuery site]
*[https://jquery.com jQuery.com, the official jQuery site]
*[http://www.n8williams.com/devblog/javascript_and_ajax/jquery-dialog-error-in-ie7-runtime-error-invalid-argument jQuery Dialog error in IE7. Runtime error: invalid argument - The Dev Pages] &mdash; the reason why we patched our jQuery


[[Category:MediaWiki development{{#translation:}}]]
[[Category:MediaWiki development{{#translation:}}]]

Latest revision as of 00:52, 7 March 2026

Warning: Display title "jQuery/en" overrides earlier display title "JQuery".


jQuery is a JavaScript library designed to simplify cross-browser development. MediaWiki has included jQuery since version 1.16.

Version

jQuery Migrate

The plugin jQuery Migrate helps developers to migrate from jQuery 1 to jQuery 3. The tracking task to remove these warnings and improve the underlying code is T169385.

Note that the stack traces are available together with the console log in modern browsers, to help to locate the origin of the deprecated function.

ResourceLoader

MediaWiki version:
1.17

As of MediaWiki 1.17 all resources are (or should be) loaded through ResourceLoader . The core modules are stored in /resources. There are no static minified versions anymore as ResourceLoader takes care of this when combining and optimizing all queued files. All code can assume that jQuery has already been loaded.

However, if your site skin was created prior to 1.17, ResourceLoader will not be loaded and jQuery will not be available.

See also