开发者

How to remove JQuery from the Window/make the GC take it

开发者 https://www.devze.com 2022-12-24 12:11 出处:网络
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 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.


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

delete window.jQuery;
delete window.$;//alias to jQuery
0

精彩评论

暂无评论...
验证码 换一张
取 消