On Jan 23, 2008, at 11:58 PM, Joel Birch wrote:
Or this (untested): $('div.box').each(function(){ var $$ = $(this); $$.append('<div class="summary"><p class="sml">' + $$.find('dd p').html() + '</p></div>'); }); Joel Birch
This looks good. I wonder if a tiny bit of performance could be squeezed out of changing the string concatenation to an array join (still untested):
$('div.box').each(function(){ var $$ = $(this); $$.append(['<div class="summary"><p class="sml">', $$.find('dd p').html(), '</p></div>'].join('') ); }); Would be interesting to see string vs. array approach tested somewhere. --Karl _________________ Karl Swedberg www.englishrules.com www.learningjquery.com