How do I upload jQuery to mediawiki?
I would like to use jQuery on my wiki.
I have checked this page (http://www.mediawiki.org/wiki/JQuery) 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.
+3
fish potato
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.
+3
MMM
source
to share
As of Mediawiki 1.17, jQuery is already loaded by default.
See: http://www.mediawiki.org/wiki/JQuery
+2
Mastergalen
source
to share