I have three divs: left, midle and right. Middle is for the contents, while the left div and the rightdiv is used only for a button that will scroll the middle div. The content of the middle div is going to be lists of pictures. So, if the user want to see the pictures that is still hidden in the right side of the middle div, they can click the right div to scroll it to the the right. 

I hope my question can be understood. 

This script is not working for my divs. I think anyone here can give me another script that can control those divs. 

Here is only the script that I cannot use

```
   $(document).ready(function () {
       $("#left").click(function () { 
       var leftPos = $('.DivDataMain').scrollLeft();
       $(".DivDataMain").animate({scrollLeft: leftPos + 250}, 600);
  });   

       $("#right").click(function () { 
       var leftPos2 = $('.DivDataMain').scrollLeft();
       $(".DivDataMain").animate({scrollLeft: leftPos2 - 250}, 600);
  });   
       });   

```

**FIDDLE:**

[Scroll Left to Right with Button](http://jsfiddle.net/Alkasih/swQ7J/1/)

Thanks in Advance