slider snaps to the direction of scrolling