title: Jquery scroll to next/prev div with same class
body: <p>I have several divs, all with the same class (post), and I have a simple navigation with UP and DOWN. </p>
  
  <pre><code>&lt;nav&gt;
  &lt;a href="" id="down"&gt;Down&lt;/a&gt;
  &lt;a href="" id="up"&gt;Up&lt;/a&gt;
  &lt;/nav&gt;
  
  &lt;div class="post one"&gt;Lorem ipsum dolor sit amet.&lt;/div&gt;
  &lt;div class="post two"&gt;Lorem ipsum dolor sit amet.&lt;/div&gt;
  &lt;div class="post three"&gt;Lorem ipsum dolor sit amet.&lt;/div&gt;
  </code></pre>
  
  <p>Everytime the user clicks in Down I want to scroll down one div at the time. Everytime the users click Up I want to go up one div at the time.</p>
  
  <p>I almost got it, but there are some errors if you click down twice and then you want to go up twice again, then the scroller gets stuck in the middle. Also if you are at the very bottom and you click Down one more time, it starts from the top. Also if you click one up and one down, the scrolling it's not following the logic that it should.</p>
  
  <p><strong>Please see it here</strong>: <a href="http://jsfiddle.net/grovve/bs6443y4/" rel="nofollow">http://jsfiddle.net/grovve/bs6443y4/</a></p>
  
  <p>I assume it's something connected with my variable "$currentElement" and what is exactly the value of this variable at a given time, am I right? What exactly am I missing to make it work as it should?</p>