Javascript go to next and previous anchors on a document
<p>I´m pretty profane in javascript.</p>

<p>I need a previous and next link that will just go to the previous or next #anchor.</p>

<p>All the anchors are divs with the same ID</p>

<p>This is what I have managed to do:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() {

// Go to the next link
function goToNext() {

        window.location.href = .next('#display');
    }
}

// Go to the previous link
function goToPrev() {

        window.location.href = .prev('#display');
    }
}

&lt;/script&gt;
</code></pre>

<p>then </p>

<pre><code>&lt;a href="javascript:goToNext()"&gt;next&lt;/a&gt;
        &lt;a href="javascript:goToPrev()" &gt;Prev&lt;/a&gt;
</code></pre>

<p>thanks!</p>
