
Untitled
By: a guest on
Jul 18th, 2012 | syntax:
None | size: 0.78 KB | hits: 8 | expires: Never
change class on different li's
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
5(2) + (2-1) 6(2) = 11 12
5(3) + (3-1) 6(3) = 17 18
<li><a href="#"><span></span><img src="images/img14.jpg" alt="" width="136" height="136" /><em class="popup"> <strong class="arrow"></strong><strong class="title">Sponsor Name Here</strong>Lorem ipsum dolor sit amet, consectetur edt adipiscing elit. Nullam dignissim enim ut co. Lorem ipsum dolor sit amet, consectetur bel adipiscing elit nullam digniss</em></a></li>
li:nth-child(6n) img, li:nth-child(6n-1) img
{
/* styles here */
}
$('li:nth-child(6n+4)').addClass('class1');
$('li:nth-child(6n+5)').addClass('class2');
li:nth-child(6n+4) {
...
}
li:nth-child(6n+5) {
...
}