title: jQuery stop left animation before div moves off screen
body: <p>I have created a basic slider for a form, once one section of the form is complete, the user clicks 'Next' and the next section slides in....if the user wants to go back they click prev etc. </p>
  
  <p>My porblem is that if a user starts out by clicking "Prev" then the form slides the wrong way and shows blank, so I need to disable the buttons when on the first and last section of the form.</p>
  
  <p>My code for the slider is simple:</p>
  
  <pre><code>$(document).ready(function(){
  //next/prev buttons
  
  $("#calc_next").click(function(){
      $("#calc_container").animate({
          left: '-=800'
      });
  });
  $("#calc_prev").click(function(){
      $("#calc_container").animate({
          left: '+=800'
      });
  });
  </code></pre>
  
  <p>You can see an example of my work here <a href="http://www.samskirrow.com/projects/distr/index3.html" rel="nofollow">http://www.samskirrow.com/projects/distr/index3.html</a></p>
  
  <p>and a jsfiddle here <a href="http://jsfiddle.net/5udRZ/" rel="nofollow">http://jsfiddle.net/5udRZ/</a></p>