.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 7eddb39..c24e794 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() {