Skip to content

Instantly share code, notes, and snippets.

@snaka
Created October 24, 2008 18:14
Show Gist options
  • Save snaka/19534 to your computer and use it in GitHub Desktop.
Save snaka/19534 to your computer and use it in GitHub Desktop.
/*
Create tag element
*/
function tag(name, attrs) {
var ele = document.createElement(name);
for(var i in attrs) {
ele[i] = attrs[i];
}
return ele;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment