{"name":"scroll","version":"0.0.1","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.1","dist":{"shasum":"710faf75da5b003d434a4cf158bcc0c1d511252e","tarball":"http://registry-npm.ywwl.com/scroll/download/scroll-0.0.1.tgz","integrity":"sha512-TUGumcQVDsZMDCXm9o9MpZjXN0uuLDN3lcJX93omOnk1HlIu1V3pU/DwyXDON3TW1bEsZcC/V+Z3ZXZXwPQ0qQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGdrnUG2sguEpOKwSye5Cp8ehhTve/3PTmTfj29O75G8AiEAt2OBuc0t2ztzcwmwaPxLFRpz+buwg3fUsQ4LD68kkiM="}],"size":1982,"noattachment":false,"key":"/scroll/-/scroll-0.0.1.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":1389008083762,"_cnpm_publish_time":1389008083762,"dist-tags":{"latest":"3.0.1"}}