Commit c206df28 authored by John Resig's avatar John Resig

Fixed a bug with append and Prototype 1.5 (via Audun).

parent f0034d64
...@@ -141,7 +141,7 @@ function $(a,c) { ...@@ -141,7 +141,7 @@ function $(a,c) {
var clone = this.size() > 1; var clone = this.size() > 1;
var a = $.clean(arguments); var a = $.clean(arguments);
return this.each(function(){ 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] ); this.appendChild( clone ? a[i].cloneNode(true) : a[i] );
}); });
}, },
...@@ -167,7 +167,7 @@ function $(a,c) { ...@@ -167,7 +167,7 @@ function $(a,c) {
var clone = this.size() > 1; var clone = this.size() > 1;
var a = $.clean(arguments); var a = $.clean(arguments);
return this.each(function(){ 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 ); this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this );
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment