Danny Wachsstock schrieb:
> Using innerHTML (like $('<div></div>') is faster than DOM creation methods;
> see http://www.quirksmode.org/dom/innerhtml.html
> but for complicated trees it's harder to understand and debug.

I often do things like this for better readability but still sticking to 
innerHtml:

$([
'<ul>',
     '<li>...</li>',
     '<li>...</li>',
'<(ul>'
].join('')).appendTo('#somewhere');

At least I think it is more readable... :-)



-- Klaus

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to