Posted By

i-am-andy on 09/27/11


Tagged

jquery nth-child


Versions (?)

Add Class To 4th Repeating Item


 / Published in: jQuery
 

URL: http://stackoverflow.com/questions/5100613/apply-class-to-every-4th-li-inside-a-ul

Add a class to every 4th item using jQuery nth-child and add class

  1. jQuery('.exploreContentArea .listArea ul li:nth-child(4n)')
  2. .addClass('last').show();

Report this snippet  

You need to login to post a comment.