Skip to content

Instantly share code, notes, and snippets.

@jacksonhenry3
Created April 26, 2013 18:31
Show Gist options
  • Select an option

  • Save jacksonhenry3/5469380 to your computer and use it in GitHub Desktop.

Select an option

Save jacksonhenry3/5469380 to your computer and use it in GitHub Desktop.
{
"libraries": [],
"mode": "javascript",
"layout": "fullscreen mode (vertical)",
"resolution": "reset"
}
var posts = [];
for (var i=0;i<10;i++)
{
var newdiv = document.createElement('div');
var divIdName = 'my'+num+'Div';
newdiv.setAttribute('id',divIdName);
posts.push(divIdName);
}
for each (var post in posts)
{
div.style.width = '100px';
div.style.height = '100px';
div.style.background-color = 'red';
div.style.position = 'absolute';
div.style.top = 200;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment