Skip to content

Instantly share code, notes, and snippets.

@yoko
Created April 6, 2011 04:44
Show Gist options
  • Save yoko/905146 to your computer and use it in GitHub Desktop.
Save yoko/905146 to your computer and use it in GitHub Desktop.
function element(tag_name, properties) {
var element = document.createElement(tag_name);
for (var k in properties) {
element[k] = properties[k];
}
return element;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment