Add Class To 4th Repeating Item


/ Published in: jQuery
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. jQuery('.exploreContentArea .listArea ul li:nth-child(4n)')
  2. .addClass('last').show();

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.