momentum

4.0.0 • Public • Published

Momentum Travis

Add momentum to any DOM element with a simple API. It's like iScroll, except not for scrolling anything. momentum also supports mouse and touch events.

const momentum = require('momentum')
 
// make sure the element is in the document and the document is fully loaded
window.addEventListener('DOMContentLoaded', () => {
  const box = document.querySelector('box')
  momentum(box, (x, y) => {
    console.log('x:', x, 'y:', y)
  })
})

NPM

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 4.0.0
    76
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 4.0.0
    76
  • 3.0.0
    3
  • 2.0.0
    3
  • 1.0.1
    3
  • 1.0.0
    4

Package Sidebar

Install

npm i momentum

Weekly Downloads

36

Version

4.0.0

License

Apache-2.0

Last publish

Collaborators

  • gdi2290