[jQuery] Element not appended in IE7
Hi, can anyone help me understand why in this case the element is not
appended in IE7:
for(var i=0; i < lista_files.length; i++) {
$a = $('<a>').appendTo($container);
$a.addClass('expander_link');
$a.attr({
'id':'exp_link_1',
'href':'#'
});
$a.html(tipo_file[1]);
alert($a[0]);
}
In firefox the alert gives me the href, in ie I get "undefined".
With this method I append also other elements (like img), and these
elements doesn't have any problem.
There is something wrong in my code?
Thank you