I am trying to highlight every second li element. It works fine with other browsers, but IE is incompatible. I tried using jQuery to solve the problem, but I have problems with its operation.
Now I have a selection of all elements in IE8 or less.
This is my code:
CSS
.ms-quicklaunch-navmgr{
overflow-y:scroll;
height:650px;
}
.s4-ql li.static:nth-child(even){
background:#CCC
}
body #s4-leftpanel{
width:255px
}
.s4-ca{
margin-left:255px
}
.even{
background:#CCC
}
Js
$(document).ready(function(){
$('.s4-ql li.static:even').addClass('even');
});
This is the HTML that is trying to create the style:

source
share