Fixed a bug with append and Prototype 1.5 (via Audun).
authorJohn Resig <jeresig@gmail.com>
Thu, 23 Mar 2006 22:29:02 +0000 (22:29 +0000)
committerJohn Resig <jeresig@gmail.com>
Thu, 23 Mar 2006 22:29:02 +0000 (22:29 +0000)
jquery/jquery.js

index 563fc29..48082c7 100644 (file)
@@ -141,7 +141,7 @@ function $(a,c) {
                        var clone = this.size() > 1;
                        var a = $.clean(arguments);
                        return this.each(function(){
-                               for ( var i in a )
+                               for ( var i = 0; i < a.length; i++ )
                                  this.appendChild( clone ? a[i].cloneNode(true) : a[i] );
                        });
                },
@@ -167,7 +167,7 @@ function $(a,c) {
                        var clone = this.size() > 1;
                        var a = $.clean(arguments);
                        return this.each(function(){
-                               for ( var i in a )
+                               for ( var i = 0; i < a.length; i++ )
                                        this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this );
                        });
                },