-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Property ScrollTop
Ryc O'Chet edited this page Jun 3, 2018
·
1 revision
- NOTE: This documentation is for Velocity v2.
This is used to set the scrollTop
property on an element. Unlike other properties it currently only supports px
and %
units. Internally the scrollTop
property is a pixel value, so it will convert from a percentage if that is used.
Please note that the user may attempt to scroll the page while this is animating, so you may wish to put in extra handling to prevent user scrolling while the animation is running.
element.velocity({
scrollTop: "50%"
});