Is it faster to construct jQuery objects using method syntax or pure html?
- by Evan Carroll
Using jQuery what provides for faster object construction:
With the HTML code
$('<dd class="foo baz" id="bar"> foobar </dd>')
Or with the pure object/method variant
$('</dd>').addClass('foo').addClass('baz').id('bar').text('foobar')
I'm not sure how the internals work, feel free to supply a high level summary.