Node~scrollIntoView Class
Only scrolls if the object is not currently visible.
This requires that all scrollable elements have position:relative. Otherwise, this algorithm will skip over them with unpredictable results.
Item Index
Methods
Methods
scrollIntoView
(
chainable
-
[config]
To receive notification of when the animation finishes, subscribe to the
event scrollIntoViewFinished
on the Y.Node instance. For consistency,
this event always fires, even without animation.
If you modify the ancestor chain while the animation is running, the results will be unpredictable.
Parameters:
-
[config]
Object optionalconfiguration
-
[anim]
optionaltrue to use default duration and easing, or object
-
[duration]
optionalduration of animation -
[easing]
optionaleasing used during animation
-
-
[margin]
optionalviewport margins, to avoid ending up under an element with
position:fixed
-
[top]
optionaltop margin (px) -
[bottom]
optionalbottom margin (px) -
[left]
optionalleft margin (px) -
[right]
optionalright margin (px)
-
-