fish potato
fish potato

Reputation: 5629

How to load jQuery in mediawiki?

I would like to use jQuery in my wiki.

I checked this page (http://www.mediawiki.org/wiki/JQuery) and it says I should use ResourceLoader to include jQuery. (I use MediaWiki 1.17.0)

But I could not get how can I do it using ResourceLoader.

Upvotes: 3

Views: 4116

Answers (2)

Mastergalen
Mastergalen

Reputation: 4389

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

See: http://www.mediawiki.org/wiki/JQuery

Upvotes: 2

MMM
MMM

Reputation: 7310

As explained in the MediaWiki manual page "ResourceLoader/Migration guide (users)":

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

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

} );

You have to use either load() or using() and select the appropriate jquery modules depending on what you need to do.

Upvotes: 3

Related Questions