I'm using xupload for an application that also uses mootools. The first function that is defined in the xupload script is a $ function that gets an element by its id.
Mootools uses the same name, to get an element by its id and create a mootools element object. Loading the xupload script therefore crashes all mootools based scripts.
Remedy was easy (just comment out the xupload $ function, xupload doesn't mind), but since mootools is widely used I would assume this problem to arise more often?
XUpload - namespace conflict with mootools
I think something like that would fix the issue:
Code: Select all
if(typeof window.$ != 'function') {
var $ = new Function("elem", "return document.getElementById(elem)")
}