How do I upload jQuery to mediawiki?

I would like to use jQuery on my wiki.

I have checked this page ( and it says that I should use ResourceLoader to enable jQuery. (I am using MediaWiki 1.17.0)

But I couldn't figure out how to do this using ResourceLoader.


source to share

2 answers

As explained on the MediaWiki manual page "Upload / Transfer Resources (Users) Guide" :

mw.loader.using( ['jquery.cookie'], function () {

/* some other script that uses $.cookie from jQuery*/

} );


You should use either load()

or using()

and select the appropriate jquery modules depending on what you need to do.



As of Mediawiki 1.17, jQuery is already loaded by default.




All Articles