I’m using jQuery as a dependency in a JavaScript ‘plugin’ of mine. I’m building the entire jQuery library into my function closure. Unfortunately it doesn’t seem to be an obvious way of stopping jQuery from going global and taking over window. noConflict is all well and good, but I don’t want my plugin to mess with the global name jQuery either, in case the site of the plugin already has a different version of it. Any ideas?
I’m using jQuery as a dependency in a JavaScript ‘plugin’ of mine. I’m building
Share
You can use
jQuery.noConflict(true)to unset the whole jQuery.