title: JQuery scroll to next instance of class
body: <p>so all I want is to scroll from the current visible class to the next instance of the class.</p>
  
  <p>HTML Looks something like this</p>
  
  <pre><code>&lt;div class="container"&gt; 
   &lt;div class="section"&gt;
  ` &lt;p&gt; lorem ipsum &lt;/p&gt;
    &lt;a href="javascript:void(null)" class="next"&gt; next section &lt;/a&gt;
   &lt;/div&gt;
  &lt;div&gt;
  </code></pre>
  
  <p>^ Repeat 'x' times</p>
  
  <p>My js:</p>
  
  <pre><code>$(.next).click(function(e){
   $('html,body').animate({}, 
    scrollTop: $(this).parent().next().offset().top
    },'slow');
  </code></pre>
  
  <p><code></code>});</p>
  
  <p>So obviously that code doesn't work as it just takes you to the next div but I'm quite rookie and would really appreciate some help.</p>
  
  <p>Fiddle: <a href="http://jsfiddle.net/o1wjedd5/" rel="nofollow">http://jsfiddle.net/o1wjedd5/</a></p>