Coffeekraken.io 0.0.1

scrollTo

Name Type Description Status Default
target { HTMLElement } The element to scroll to required
duration { Number } The animation duration required
easing { Function } An easing Function required
offset { Number } The destination offset required
align { String } The destination align (top, center, bottom) required
onFinish { Function } A callback to call when the animation if finished required

Example

    import scrollTop from 'sugarcss/js/dom/scrollTo'
import easeInOutQuad from 'sugarcss/js/easings/easeInOutQuad'
scrollTo(myCoolHTMLElement, 2000, easeInOutQuad);

Author : Olivier Bossel olivier.bossel@gmail.com

Default : false