Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 18th, 2012  |  syntax: None  |  size: 0.78 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. change class on different li's
  2. 1    2    3    4    5    6
  3. 7    8    9    10   11   12
  4. 13   14   15   16   17   18
  5.        
  6. 5(2) + (2-1)    6(2)  =    11    12
  7.    5(3) + (3-1)    6(3)  =    17    18
  8.        
  9. <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>
  10.        
  11. li:nth-child(6n) img, li:nth-child(6n-1) img
  12. {
  13.     /* styles here */
  14. }
  15.        
  16. $('li:nth-child(6n+4)').addClass('class1');
  17. $('li:nth-child(6n+5)').addClass('class2');
  18.        
  19. li:nth-child(6n+4) {
  20.   ...
  21. }
  22.  
  23. li:nth-child(6n+5) {
  24.   ...
  25. }