Skip to content

Instantly share code, notes, and snippets.

@henrikh
Created October 22, 2009 15:41
Show Gist options
  • Save henrikh/216020 to your computer and use it in GitHub Desktop.
Save henrikh/216020 to your computer and use it in GitHub Desktop.
element = new Element('div', {
id: 'id',
//Various other properties
children: [
new Element('a', {
//Properties
}),
new Element('img', {
//Guess what
})
]
});
/* This will allow you to make complete "trees" of elements, using a single constructor. Anything that could be included? */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment