I want to target these element for my 3 collumn portfolio page and I did something like this :
jQuery('.page-template-portfolio-full-php #portfolioItem li:nth-child(3n)').css({ marginRight: '0px'});
jQuery('.page-template-portfolio-full-php #portfolioItem li:nth-child(6n)').css({ marginRight: '0px'});
jQuery('.page-template-portfolio-full-php #portfolioItem li:nth-child(9n)').css({ marginRight: '0px'});
jQuery('.page-template-portfolio-full-php #portfolioItem li:nth-child(12n)').css({ marginRight: '0px'});
I know it’s not the best way and I know I could do something like i++ or something but im not sure exactly what it is ..
I want to do the same thing for the 2 collumn .. only this time target every 2nd, 4th, 6th element etc etc ..
How is it done?
Thanks guys!



