moodle/lib/requirejs/moodle-config.js causing issues

Re: moodle/lib/requirejs/moodle-config.js causing issues

by Justin Hunt -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Plugin developers
This type of error occurs because the jquery plugin jplayer has not been loaded. Either your jplayer load script ran before jquery was loaded. Or more likely, after you loaded jplayer plugin library, somewhere else jquery was loaded again into the global space. This would overwrite the jquery that you had loaded jplayer plugin in.

A quick fix might be to load jplayer in the footer (not in the header)

AMD modules were designed to get you out of just this sort of nastiness. Though its a bit of a learning curve, rewriting your JS as AMD modules will save you time and stress in the long run.