tkahn / Smooth-Div-Scroll

A jQuery plugin for smooth scrolling. No longer maintained.
471 stars 184 forks source link

SmoothDivScroll and buttons to animate Left the scrollableArea #97

Open leMich opened 11 years ago

leMich commented 11 years ago

Hi, i'm working on a website wich must integrate a top fixed menu (must scroll a long horizontal container div when clicking) and SmoothDivScroll.

Without clinking an a menu item, each function is ok (jump to a div and scroll with mouse left/right). But after scrolling left/right with smoothDivScroll, if i jump to a desired div position with the menu, the position is not correct.

Here's how i jump to a div position: $('.scrollableArea').animate({left: $('.scrollableArea').offset().left - $(myDiv).offset().left) }, 2000,'easeInOutCubic');

Any idea or tip to make it work together?

leMich commented 11 years ago

Precision: if i jump right to a div position, the left scroll is not possible anymore with SmoothDivScroll (i can't go back to the 0 position of my container).