I have a list
<ul>
<li>1</li>
<li class="active">2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
I need a jquery to add a class to one of active class siblings (prev or next sibling). This is a part of a navigation and active class it's the active page. Can anyone help please?
Thank you!!
UPDATE: I found another way to add style to the next element from a list, with css: CSS next element Here's a demo: http://jsfiddle.net/S52YH/2/ Thank you for your effort!!