Created
September 14, 2011 18:35
-
-
Save sfrdmn/1217377 to your computer and use it in GitHub Desktop.
DAI 523 - Pino vs. Godzilla
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var title = document.getElementById("title"); | |
title.parentNode.removeChild(title); | |
function square( x ) { | |
return x * x; | |
} | |
pino.buildWall = function( n ) { | |
var wall = document.getElementById("wall"); | |
var i = 0; | |
for( i = 0; i < n; i++ ) { | |
var brick = document.createElement("div"); | |
brick.id = "brick"; | |
wall.appendChild(brick); | |
} | |
var numChildren = wall.children.length; | |
var bottom = 0; | |
for( i = 0; i < numChildren; i++ ) { | |
var child = wall.children[i]; | |
console.log(wall.children[i]); | |
bottom = i*30; | |
child.style.setProperty("bottom",bottom+"px",null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment