Skip to content

Instantly share code, notes, and snippets.

@sfrdmn
Created September 14, 2011 18:35
Show Gist options
  • Save sfrdmn/1217377 to your computer and use it in GitHub Desktop.
Save sfrdmn/1217377 to your computer and use it in GitHub Desktop.
DAI 523 - Pino vs. Godzilla
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