Why does the following code won't work in IE browsers (7 and 8)?
$("ul li").each(function() {
if(($.trim($(this).attr("style"))) != "display: none;"){
//if content
}else if(($.trim($(this).attr("style"))) == "display: none;"){
//else content
}
});
Note: The first 4 li elements do not not have "style" attribute and the remaining 8 do.