.each and "li" bold
.each and "li" bold
So i have this code before jquery starts and then i call it in order to highlight the correct item in my <ul></ul> list.. on Firefox it works just fine but on IE8 it doesnt work, doesnt make the li item bold..
here is my code:
- function highlight_li(){
$(".main_div").find("li").each(function() {
if ($(this).text() === "second_li"){
$(this).css("font-weight", "bold");
}
});
}
So what this does is it searches the .main_div's <ul> list and if a li item has the value of "second_li" it makes it bold.. Also i noticed that on IE 8 on developer tools , browser mode is on IE8 compat view and document mode is on ie7 standars , these values seem to be default .. if i change the document mode to ie8 it will work fine...
thanks.