views:

32

answers:

1

I have a page, when loaded it does some stuff with JQ.
In the next phase I want to load mootools and remove all JQ stuff, to avoid collisions and to avoid memory leaking.
I am not giving you the all picture (to simplify the question), but assume I am not doing something stupid here, and it needs to be done how I am asking it.

+1  A: 

jQuery has a noConflict option to avoid collisions.. but I guess you could delete it...

delete window.jQuery;
delete window.$;//alias to jQuery
scunliffe
No collisions yes, but the current code base is so spaghetti that the browser will crash if I don't clean it completely. SO, this will also delete all the plugins? Are they under window.JQuery?
Itay Moav
This would delete jQuery (the core library)... and any plugins that live within jQuery (e.g. extend it), but if they create their own globals, it won't delete them AFAIK.
scunliffe