Example:
<ul id="nav1">
<li><a href="page1.html">Page 1</a></li>
<li class="active"><a href="page2.html">Page 2</a></li>
<li><a href="page3.html">Page 3</a></li>
<li><a href="page4.html">Page 4</a></li>
</ul>
In this example im currently on Page 2, on Page 2 I want to place a Next Page button with an url to Page 3.
How do I get the href of Page 3 (with JavaScript)?
If you can use jQuery
otherwise in plain javascript (example fiddle: http://jsfiddle.net/gGRcX/2/ )
querySelectorAllworks on every modern browser and on IE8+