Add class of 'last' to every 3rd image


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

Quick little clientside script to pick out every 3rd image and add a class of last to it.

I needed this because the images were layed out in 3 columns, adding a margin to the right hand side would leave a large gap on the right hand side which i didn't want. This now allows me to remove the margin for the last image.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.