0.6.2 • Published 1 month ago

page-scroll v0.6.2

Weekly downloads
18
License
MIT
Repository
github
Last release
1 month ago

pageScroll

a no-dependency function that page scroll smoothly

Latest NPM release MIT License

demos

Usage

with NPM

$ npm install --save page-scroll

then

import pageScroll from 'page-scroll';

As a Standalone lib

Copy page-scroll.js from /dist/page-scroll.js and place it in your project.

<script src="./js/page-scroll.js"></script>

Applying effects

<button onclick="pageScroll( 500 )">to 500px</button>
<button onclick="pageScroll( document.querySelector( '.target' ) )">to the element</button>

options

pageScroll takes options in second argument.

pageScroll( 500, {
	duration: 500,
	easing: 'easeOutExpo',
	disableInterrupt: true,
} ).then( () => console.log( 'done' ), () => console.log( 'canceled' ) );

for overflow elements

pageScroll( 500, {
	el: document.querySelector( '.overflowScrollElement' ),
	duration: 500,
	easing: 'easeOutExpo',
	disableInterrupt: true,
} );
0.6.2

1 month ago

0.6.1

9 months ago

0.6.0

11 months ago

0.5.0

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.2

2 years ago

0.3.1

3 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

5 years ago

0.1.0

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago