title: Scroll to the top of the page after a sequence of divs
body: <p>The code I have scrolls through a sequence of <code>divs</code>, each called <code>.container</code>. Each <code>.container</code> has a 100% height, so the user ends up quite far down the page as a result. </p>
  
  <p>Now I am trying to scroll back to the top (using the same <code>.container</code> class) once the user reaches to the bottom of the page.</p>
  
  <pre><code>$('.down').click(function (e) {
      var next_container = $(this)
          .next(container);
      $('html, body')
          .animate({
          scrollTop: next_container.offset().top
      }, 'slow');
  });
  </code></pre>
  
  <p>Is there way for the jQuery to detect that the user is at the bottom of the document, and as a result, scroll to the first <code>.container</code> (rather than the next)?</p>