Skip to content

Instantly share code, notes, and snippets.

@danwrong
Created February 27, 2009 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danwrong/71517 to your computer and use it in GitHub Desktop.
Save danwrong/71517 to your computer and use it in GitHub Desktop.
Idea of what DOM builder for jQuery should look like
$.build(function(html) {
html.div(
html.a({ href: 'http://google.com' }, 'Click this link'),
html.span('Some text')
)
}).appendTo(body);
$.build(function(html) {
return html.div(
html.a({ href: 'http://google.com' }, 'Click this link'),
html.span('Some text')
)
}).appendTo(body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment