freekir
2/23/2015 - 7:47 PM

even odd in jquery and css

even odd in jquery and css

$('li:even').css('background', '#CCC');
$('li:odd').css('background', '#FFF');
tr:nth-child(even) {background: #CCC}
tr:nth-child(odd) {background: #FFF}