0.6.2 • Published 1 year ago

page-scroll v0.6.2

Weekly downloads
18
License
MIT
Repository
github
Last release
1 year 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 year ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

3 years ago

0.3.2

3 years ago

0.3.1

4 years ago

0.3.0

5 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

7 years ago

0.0.6

7 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago