JQuery loading twice and cancelling code

Re: JQuery loading twice and cancelling code

by Justin Hunt -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Plugin developers
This happens because jquery is loaded into the global space and a plugin (jquery-ui) is installed. And then something else loads jquery again into the global space overwriting the previous one, and so your plugin is gone.

You really need to use AMD modules (there are also ECMA6 modules since 3.8 but my brain was already full ) because these manage the loading so that you do not get conflicts like this. Yes its a bit harder, once to write them, and twice because you need to compile them with grunt. But once you "got it" and it's all set up, really its better.

I am not sure you want to go all the way to rewrite those or not but here is a link to related forum post:
https://moodle.org/mod/forum/discuss.php?d=368639