Module

scroll

This file contains a functionality to scrolling an HTML element.

View Source utils/scroll.js, line 1

Methods

# static scrollToElement(element, durationopt, offsetopt)

Scroll to a DOM element.

Parameters:
Name Type Attributes Default Description
element object

DOM element

duration number <optional>
300

Duration of the movement in milliseconds.

offset number <optional>
0

Distance to the element to keep.

View Source utils/scroll.js, line 14