[snip]
what I think we have here, is that $('#cat')
is expensive, and run
inside a loop in dojBuild
you can build and append in the jquery version and it only shaves 10ms.
ie the following still incurs the jquery html building function call costs:
function dojBuild(){
var o ='';
for(var i =0 ;i < repetCount;i++){
o+=$('<span/>')
.attr({
'id' : i,
'class' :'fish'
})
.append( $('<p/>')
.attr({
'class' :'dog',
'rel' : 'foo'
})
.text( i )
).html()
}
$('#cat').append(o);
}