Topic on Project:Support desk

jquery.cookie fired after MediaWiki:Common.js on mobile

3
Subfader (talkcontribs)

The module jquery.cookie is fired after MediaWiki:Common.js on mobile devices. This makes it impossible to use $.cookie in MediaWiki:Common.js.

Why is that so?

MW 1.25.2

Ciencia Al Poder (talkcontribs)
mw.loader.using('jquery.cookie').done(function() { 
  // Your code goes here
});
Subfader (talkcontribs)

Thanks, turns out I used it in a function that fired on $(document).ready() and $(window).load() depending on mobile or not. Using mw.loader.using('jquery.cookie').done() now.

Reply to "jquery.cookie fired after MediaWiki:Common.js on mobile"