title: Stop Scrolling if there is no Content left
body: <p>I want this script to stop scrolling if clicked, when there is no more content left in the div. </p>
  
  <pre><code>$(document).ready(function () {
      $("#right").click(function () { 
          var leftPos = $('.DivDataMain').scrollLeft();
          $(".DivDataMain").animate({scrollLeft: leftPos + 250}, 800);
      });   
  
      $("#left").click(function () { 
          var leftPos2 = $('.DivDataMain').scrollLeft();
          $(".DivDataMain").animate({scrollLeft: leftPos2 - 250}, 800);
      });   
  });  
  </code></pre>
  
  <p>This is the demo link: <a href="http://jsfiddle.net/Alkasih/UHmJ2/" rel="nofollow">FIDDLE</a></p>
  
  <p>In the demo, it keeps scrolling to the right side although the div has no content anymore to show. I want it to stop.  </p>
  
  <p>Thanks in Advance. </p>