oj-scroll-to
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    ScrollTo

    Scroll to elements on a page.

    mount

    mount(): ScrollTo[] Mounts all elements with the [data-scroll-to] attribute.

    constructor

    constructor(root: HTMLElement, options: IOptions): ScrollTo Binds a click and touchend event listener to the given root element. When the event is emitted, the options.selector gets queried and scrolled into view.

    unmount

    unmount(): void Removes theevent listeners.

    Events

    change

    .on("change") Listen to changes (scroll to command)

    Install

    npm i oj-scroll-to

    DownloadsWeekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    7.19 kB

    Total Files

    6

    Last publish

    Collaborators

    • orange-juice