Help with adding classes

The above site is where I have an issue. I need to make the boxes line up perfectly, so I have added margin-right to all the LI elements, but for the 3rd element in each line I have added a class called ‘bookend’ and in the CSS this gets no margin-right, and it fits perfectly.

However, if I select the 2nd page in the pagination, it doesn’t apply the class to the 3rd element.

This is my jQuery:

$(document).ready(function () {	
	$('ul.ProductList li:nth-child(3n-0)').addClass('bookend');

Any ideas? Really stressing me out.

Wow, I’m guessing this forum isn’t that useful anymore. Can anyone recommend a good jQuery/JavaScript forum?

Would running the jQuery statement again once the new page is displayed help?

Just because you didn’t get the help you didn’t want doesn’t immediately make the forum “not that useful” any more. Seems a bit ungrateful, especially considering how many times you have got help here in the past.

r51 is right, it seems you need to run that statement again once your Ajax request has loaded the 2nd page items.

By the way, you should keep the first page once you’ve gone to the 2nd. That way if I click the “previous” link, I don’t have to wait for the Ajax request to happen for something that I was just looking at.

Also, you might want to check out your class names for the list items. The further down you go the more they look like this:

<li class="EvenOddEvenOddEvenOddEvenOddEvenOddEven">