]> source.dussan.org Git - jquery.git/commitdiff
.remove() is no longer destructive (so that appendTo can be used later).
authorJohn Resig <jeresig@gmail.com>
Wed, 5 Jul 2006 02:09:38 +0000 (02:09 +0000)
committerJohn Resig <jeresig@gmail.com>
Wed, 5 Jul 2006 02:09:38 +0000 (02:09 +0000)
jquery/jquery.js

index 7eddb394de65525a4b32645e5539c9bd2109a9af..c24e7949ea5887b469a2b42520d6ac91e4f606b7 100644 (file)
@@ -173,8 +173,9 @@ jQuery.fn = jQuery.prototype = {
                });
        },
        remove: function() {
-               this.each(function(){this.parentNode.removeChild( this );});
-               return this.pushStack( [] );
+               return this.each(function(){
+                       this.parentNode.removeChild( this );
+               });
        },
        
        wrap: function() {