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();


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.