1.0.9 • Published 5 years ago

scrolling-observer v1.0.9

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

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() // 初始化
  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

1.0.9

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago