I’ve looked everywhere but I can’t find a proper answer (maybe I missed it). In my carousel, when an item is clicked, it should move, by sliding, to the middle of carousel. I’m using animate({scrollLeft: value }, speed); but it doesn’t do any animation, but if I do scrollTop it works (by tweaking the css of course…).
Why is scrollTop: value working and scrollLeft: value not working, in animate()?
Please check my jsFiddle: http://jsfiddle.net/rKAHV/
Many thanks
It doesn’t work because there is no scrolling to be done, your container is as wide as all the elements together. Scrolling would be possible only if there was scrollbars (the browser would add some)
If the intention is to only move an element you could try animating them based on their left position instead.