{"name":"scroll","version":"0.0.2","description":"A function that animates an element’s scrollTop value.","main":"index.js","dependencies":{"ease-component":"~1.0.0","raf-component":"~1.1.2","eventlistener":"0.0.1"},"devDependencies":{"tape":"~2.3.2"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":{"ie":[6,7,8,9,10],"chrome":[20,25,29],"firefox":[3,4,7,19,24],"safari":[5.1,6],"opera":[10,12,15],"iphone":[6],"android":[4.2]}},"repository":{"type":"git","url":"git@github.com:michaelrhodes/scroll.git"},"keywords":["scrollTop","scrollTo","animate"],"author":{"name":"Michael Rhodes"},"license":"MIT","bugs":{"url":"https://github.com/michaelrhodes/scroll/issues"},"homepage":"https://github.com/michaelrhodes/scroll","_id":"scroll@0.0.2","dist":{"shasum":"5bc03d9864721ee83f34be82a05968ecd447dd03","tarball":"http://registry-npm.ywwl.com/scroll/download/scroll-0.0.2.tgz","integrity":"sha512-IFZLLvuS7fv/cO54ZxX3WSqffJoFQ39O/n8lRwuuDeErz5YduhHgIIZO+ocOcTnZhwpTb610nv0qIDrm/8B4sw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpAnS+80Y89KbNTn2Bc5aIYNCDAEqfFWIyPG0EoKewGgIgYDW8wmLJtTOEMwTeHx354cjU08Lvx0BMdDXebHl9uBE="}],"size":1991,"noattachment":false,"key":"/scroll/-/scroll-0.0.2.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"michaelrhodes","email":"spam@michaelrhod.es"},"maintainers":[{"name":"michaelrhodes","email":"spam@michaelrhod.es"}],"directories":{},"readme":"# scroll\nanimates the scroll top/left position of an element (in 340 bytes)\n\n[![browser support](https://ci.testling.com/michaelrhodes/scroll.png)](https://ci.testling.com/michaelrhodes/scroll)\n\nnote: you may need to polyfill [`requestAnimationFrame`](https://caniuse.com/#feat=requestanimationframe) in older browsers\n\n## install\n```sh\nnpm install scroll\n```\n\n## use\n```js\nvar scroll = require('scroll')\nvar page = require('scroll-doc')()\nvar ease = require('ease-component')\n\n// Basic usage\nscroll.left(page, 200)\n\n// Register a callback\nscroll.top(page, 200, function (err, scrollTop) {\n  console.log(err)\n  // { message: \"Scroll cancelled\" } or\n  // { message: \"Element already at target scroll position\" } or\n  // null\n\n  console.log(scrollTop)\n  // => The new scrollTop position of the element\n  // This is always returned, even when there’s an `err`.\n})\n\n// Specify a custom easing function\nscroll.left(page, 200, { ease: ease.inBounce })\n\n// Specify a duration in milliseconds (default: 350) and register a callback.\nscroll.left(page, 200, { duration: 1000 }, function (err, scrollLeft) {\n})\n\n// Cancel a scroll animation\nvar options = { duration: 1000 }\nvar cancel = scroll.top(page, 200, options, function (err, scrollTop) {\n  console.log(err.message)\n  // => Scroll cancelled\n\n  page.removeEventListener('wheel', cancel)\n})\n\npage.addEventListener('wheel', cancel)\n```\n\nnote: the default easing is `inOutSine` from [component/ease](https://github.com/component/ease).\n\n## obey\n[MIT](https://github.com/michaelrhodes/scroll/blob/master/LICENSE)\n","publish_time":1389047996857,"_cnpm_publish_time":1389047996857,"dist-tags":{"latest":"3.0.1"}}