Skip to content

trusktr/magic-scroll

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License npm version HitCount size

MagicScroll

Why MagicScroll?

If you have tried to use Apple magic mouse or macbook Trackpad, the scroll is very smooth. However normal scroll is not. In order to make the smilar effect I have tried to implement MagicScroll. We can apply this for any kind of place where mouse wheel is need to be smooth (For example, IndoorJS demo below)

Demo

Install

  npm i magic-scroll.js -S

or

https://unpkg.com/magic-scroll.js/dist/MagicScroll.umd.js

Usage

let magicScroll = new MagicScroll({
  target: document.querySelector(".scroll-view.after"), // for body, no need to set target
  speed: 80,
  smooth: 12
});

License

MIT.

About

Apple Magic Mouse scrolling effect for normal mouses

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 96.1%
  • JavaScript 3.9%