Posted By

bionickid on 02/08/10


Tagged

jquery selector child nth-child


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

alejandrosuch
nightshiftc


nth-child jquery


 / Published in: jQuery
 

  1. $("ul li:nth-child(3n+1)").addClass("A")
  2. $("ul li:nth-child(3n+2)").addClass("B")
  3. $("ul li:nth-child(3n)").addClass("C")

Report this snippet  

You need to login to post a comment.