[jQuery] $(byName) <> $(byClass) in 1.3.2

[jQuery] $(byName) <> $(byClass) in 1.3.2


hello, i'm new at using jQuery and i'm trying to create dynamic
content.
the problem is thant i can't retrieve the
new content by name.
here is an example to reproduce what i'm saying.
(function() {
fn = function() {
$('.widgetBar').append('<div class=\'acc1\'></div>');
var acc = $('.acc1');
//var htmlText = '<a class=\'widgetBasSelector basic\'>Hola!!</
a><div class=pp name=\'div1\'></div>';
var htmlText = '<a class=\'widgetBasSelector basic\'>Hola!!</
a><div class=pp name=div1></div>';
acc.append(htmlText);
alert($('#div1').size()); // Returns 0
alert($('.pp').size()); // Returns 1
};
$(fn);
return;
})
();
what i'm doing wrong ?
thanks.