public
Created

Fix memory leak in IE7 jQuery.remove()

  • Download Gist
ie7gc.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11
if ($.browser.msie && $.browser.version <= 7) {
(function () {
$.fn.originalRemove = $.fn.remove;
$.fn.remove = function (selector) {
this.originalRemove(selector);
for (var k in this) {
delete this[k];
}
};
})(jQuery);
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.