Socket
Socket
Sign inDemoInstall

window-scroller

Package Overview
Dependencies
5
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    window-scroller

window scrolling animating


Version published
Maintainers
1
Created

Readme

Source

window-scroller

Credit:

@shunryu111 http://stackoverflow.com/users/2630316/shunryu111

Based on:

http://stackoverflow.com/a/26798337/5068410

install

npm install window-scroller --save

usage

import Scroller from 'window-scroller';
OR
const Scroller = require('window-scroller');

Scroller.to(500).scroll()
Scroller.to(500).speed(700).scroll()
Scroller.to(500).easing('easeOutSine').scroll();
Scroller.to(500).speed(700).easing('easeInOutSine').scroll();

const element = document.getElementById('rolling');
Scroller.to(element).scroll()
Scroller.to(element).speed(700).scroll()
Scroller.to(element).easing('easeInOutQuint').scroll();
Scroller.to(element).speed(700).easing('easeInOutQuint').scroll();

options

speed (Integer):

  • 0 -> inf

easing (String):

  • easeOutSine
  • easeInOutSine
  • easeInOutQuint

to (Integer | Element):

  • DOM Element
  • Integer

Keywords

FAQs

Last updated on 30 Jan 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc