iegorov
3/14/2014 - 4:46 AM

Using CSS :even and :odd pseudo-classes with list items add classes via Jquery jQuery("li:odd").addClass("odd"); jQuery("li:even").addClass(

Using CSS :even and :odd pseudo-classes with list items add classes via Jquery jQuery("li:odd").addClass("odd"); jQuery("li:even").addClass("even"); and use css: .odd {float:left !important;} .even {float:right !important;}

li {
    color: blue;
}
li:nth-child(odd) {
    color: green;
}
li:nth-child(even) {
    color: red;
}