Hi Raymond,
I'm not sure if this is less cpu intensive, but at least it's more
jQuery:
$('div.box').each(function() {
var $snippet = $(this).find('dd p').html();
$(this).append('div class=summaryp class=sml' + $snippet +
'/p/div');
});
--
Bohdan Ganicky
On Jan 24, 12:01 am, Raymond [EMAIL
The other suggestions are good starting points. One comment though...
doing $(div.box) needs to examine EVERY div on your page to see if it
has the .box class. If you can constrain that search some that could
help improve performance. For instance, if you only care about the
div's in a
On Jan 23, 2008, at 11:58 PM, Joel Birch wrote:
Or this (untested):
$('div.box').each(function(){
var $$ = $(this);
$$.append('div class=summaryp class=sml' + $$.find('dd
p').html() + '/p/div');
});
Joel Birch
This looks good. I wonder if a tiny bit of performance could be
Thanks to everyone for the suggestions. All were faster than the
original but I went with Joel's as it seems to be the quickest. Thanks
again!
Try this (untested):
$('div.box').each(function(count, box) {
$(box).append('div class=summaryp class=sml' + $('dd p',
box).html() + '/p/div');
});
On Jan 23, 2008 5:01 PM, Raymond [EMAIL PROTECTED]
wrote:
I was wondering if anyone knows of a less processor intensive way of
doing the
Or this (untested):
$('div.box').each(function(){
var $$ = $(this);
$$.append('div class=summaryp class=sml' + $$.find('dd
p').html() + '/p/div');
});
Joel Birch
6 matches
Mail list logo