/ Published in: jQuery
Expand |
Embed | Plain Text
$("ul li:nth-child(3n+1)").addClass("A") $("ul li:nth-child(3n+2)").addClass("B") $("ul li:nth-child(3n)").addClass("C")
You need to login to post a comment.
bionickid on 02/08/10
jquery selector child nth-child
2 people have marked this snippet as a favorite
$("ul li:nth-child(3n+1)").addClass("A") $("ul li:nth-child(3n+2)").addClass("B") $("ul li:nth-child(3n)").addClass("C")
You need to login to post a comment.