[jQuery] attr ie bug
[jQuery] attr ie bug
hi i'm using this code to add the target=_blank attribute to links.
$("a[href]").each(function(){
if ($(this).hasClass("ppt") || $(this).hasClass("pdf") || $
(this).hasClass("allegato") || $(this).hasClass("doc") || $
(this).hasClass("jpg") || $(this).hasClass("xls") || $
(this).hasClass("external") || $(this).hasClass("zip")){
$(this).attr("target","_blank");
}
});
it works fine in firefox but not with ie which throws a javascript
error i can't identify.
any idea why? is that my error or an ie bug?
Thanks vitto