litera / jquery-scrollintoview

Animated scroll into view jQuery plugin
http://erraticdev.blogspot.com/2011/02/jquery-scroll-into-view-plugin-with.html
231 stars 136 forks source link

Ability to manually specify the scroll parent #19

Open scriby opened 9 years ago

scriby commented 9 years ago

It's nice that the library automatically looks up the DOM for the first scrollable parent, but I have a bit of a corner case where the automatic detection doesn't work.

I have a div (A) whose scrollLeft is manually synchronized with the scrollLeft of another div (B). The element I want to scroll into view is contained in A, but it doesn't appear to be scrollable, even though it really is (A has overflow: hidden).

Would you consider allowing the scroll parent to be manually passed to jquery-scrollintoview to support this corner case?