A Simple JS library that detects mobile app is scrolling or not.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
src
test
.babelrc
.editorconfig
.eslintrc.js
.gitignore
.travis.yml
LICENSE
README.md
package-lock.json
package.json

README.md

NPM version Build Status npm download GitHub license PRs Welcome

scrolling-observer

A Simple JS library that detects mobile app is scrolling or not.

To solve JavaScript Scroll Event Delay,for example Bootstrap issue #16202

Example

html script

<script src="../dist/sscrolling-observer.min.js"></script>
<script>
  var scroll = window['scrolling-observer'].default() // init
  setInterval(() => {
    if (scroll.isScrolling) {
      console.log(scroll.isScrolling, new Date().getTime())
    }
  }, 50)
</script>

npm:

$ npm install --save

JavaScript

import scroll from 'scrolling-observer'

// init
scroll()

// check
console.log(scroll().isScrolling)

// destroy
scroll().destroy()

License

MIT