Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix global variable

  • Loading branch information...
commit b659f4e78c9c59c81eb8d212ac7ba539dd3e2057 1 parent 1fdd187
@arian arian authored
Showing with 9 additions and 9 deletions.
  1. +4 −4 demos/Native/demo.html
  2. +5 −5 demos/Native/demo.js
View
8 demos/Native/demo.html
@@ -11,11 +11,11 @@
<pre>Elements.implement({
equalize: function(property){
- var sum = 0,
- length = i = this.length;
+ var sum = 0, i, len;
+ len = i = this.length;
while (i--) sum += this[i].getDimensions()[property];
- var average = Math.round(sum / length);
- i = length;
+ var average = Math.round(sum / len);
+ i = len;
while (i--) this.tween(property, average);
return this;
},
View
10 demos/Native/demo.js
@@ -3,11 +3,11 @@
Elements.implement({
equalize: function(property){
- var sum = 0,
- length = i = this.length;
+ var sum = 0, i, len;
+ len = i = this.length;
while (i--) sum += this[i].getDimensions()[property];
- var average = Math.round(sum / length);
- i = length;
+ var average = Math.round(sum / len);
+ i = len;
while (i--) this.tween(property, average);
return this;
},
@@ -33,6 +33,6 @@ window.addEvent('domready', function(){
i = !i
if (i) els.equalize('height');
- else els.setRandom('height', 30, 100);
+ else els.setRandom('height', 30, 150);
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.