I want to add a left border color on my vertical navigation with each list item is a different colour so i thought about adding a incremented class name that starts to repeat after 6 list items.
$('ul').find('li').each(function(i){ var num = (i%6) + 1; // mod function - returns the remainder $(this) .addClass('class-' + num ) .html('item ' + num); });
Can you help me try to accomplish this effect.
Thanks for any suggestions
You might need to tweak it a bit but you get the idea.