From a33f85e691e07f03f724b2bd3c6948b346d33ee6 Mon Sep 17 00:00:00 2001 From: Ariel Flesler Date: Tue, 15 Jul 2008 15:58:01 +0000 Subject: [PATCH] jquery core: closes #3159. remove() would unbind form.elements instead of a form. --- src/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index 3a759d55..fd19d759 100644 --- a/src/core.js +++ b/src/core.js @@ -1309,7 +1309,7 @@ jQuery.each({ remove: function( selector ) { if ( !selector || jQuery.filter( selector, [ this ] ).r.length ) { // Prevent memory leaks - jQuery( "*", this ).add(this).each(function(){ + jQuery( "*", this ).add([this]).each(function(){ jQuery.event.remove(this); jQuery.removeData(this); });