Reputation: 68650
As shown here: http://jsfiddle.net/3sNbV/
$('.box:nth-child(5n)').addClass('edge');
.. the nth element is incorrect if you have any other html elements in there besides the one its looking for, although I've specifically given a classname.
Is there a way to avoid this behaviour without changing the markup?
Thanks
Upvotes: 1
Views: 22