1.0.10 • Published 4 years ago

@atyoursite/animation v1.0.10

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

Animation

animateBody()

Description

Scroll the body to a given position. (cross browser). In the configuration you can opt to use a callback before or after the animation.

Installation

Open a terminal window inside the root of your project to install the node package.

npm install --save-dev @atyoursite/animation

Dependency

To be able to use the function, you will have to import it as a dependency

import { animateBody } from '@atyoursite/animation';

Usage

function runAfter() {
    console.log('After scrolling');
}

function runBefore() {
    console.log('Before scrolling');
}

animateBody({
    scrollTop: 150,
    duration: 2000,
    cbBefore: runBefore,
    cbAfter: runAfter
});
1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago