Created
February 27, 2009 15:19
-
-
Save danwrong/71517 to your computer and use it in GitHub Desktop.
Idea of what DOM builder for jQuery should look like
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.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