{"_id":"smoothscroll","_rev":"14-0875ba370635f231067d98a151c0efd5","name":"smoothscroll","description":"A teeny tiny smooth scroll script with ease-in-out effect and no jQuery.","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"smoothscroll","version":"0.1.0","description":"A teeny tiny smooth scroll script with ease-in-out effect and no jQuery.","main":"smoothscroll.js","author":{"name":"Alice Lieutier","email":"alice@lieutier.me","url":"http://alice.lieutier.me"},"license":"MIT","homepage":"https://github.com/alicelieutier/smoothScroll#readme","repository":{"type":"git","url":"https://github.com/alicelieutier/smoothScroll.git"},"keywords":["smooth scroll","scroll","no jQuery","anchor"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"907bb1f7939e7c734bc45c080fd0502984ab0cd8","bugs":{"url":"https://github.com/alicelieutier/smoothScroll/issues"},"_id":"smoothscroll@0.1.0","_shasum":"576c86e68738927019c81d202790e7e769bbd7d3","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"alicelieutier","email":"alice.lieutier@gmail.com"},"dist":{"shasum":"576c86e68738927019c81d202790e7e769bbd7d3","tarball":"https://registry.npmjs.org/smoothscroll/-/smoothscroll-0.1.0.tgz","integrity":"sha512-jo5NsOibiTFX3Aa1nYO/qrg9WgUWFTsp6+penqaoArL+sLZIn18VGzn/MJ/7c2n//PitwTgNMST2qoc5LIc7+g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnCU0sqNvT+ZhvCWECrgPKZUc8uczJcYNXghL6eaLoxwIgTT7GFN3y+VWmH8qZTDxtq04PsLHtZVNqAEAOB5EEiMc="}]},"maintainers":[{"name":"alicelieutier","email":"alice.lieutier@gmail.com"}]},"0.2.0":{"name":"smoothscroll","version":"0.2.0","description":"A teeny tiny smooth scroll script with ease-in-out effect and no jQuery.","main":"smoothscroll.js","author":{"name":"Alice Lieutier","email":"alice@lieutier.me","url":"http://alice.lieutier.me"},"license":"MIT","homepage":"https://github.com/alicelieutier/smoothScroll#readme","repository":{"type":"git","url":"https://github.com/alicelieutier/smoothScroll.git"},"keywords":["smooth scroll","scroll","no jQuery","anchor"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"b116363eb627381dd7ed0062ffcf14ae26e233b1","bugs":{"url":"https://github.com/alicelieutier/smoothScroll/issues"},"_id":"smoothscroll@0.2.0","_shasum":"5760a0c214a0e6c28d2fdfa0febba057332f332e","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"alicelieutier","email":"alice.lieutier@gmail.com"},"dist":{"shasum":"5760a0c214a0e6c28d2fdfa0febba057332f332e","tarball":"https://registry.npmjs.org/smoothscroll/-/smoothscroll-0.2.0.tgz","integrity":"sha512-utRE6jX0ZX/Y7iUhYiMKZKt37uUw3yw1N9K98gDBCobfTNlYHODBLusZLMfWAoa670EjG+YdjRe1WDXn5cUWlA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6YXKqbrm8fyAxdlPZnTg7sP8ntfd2Wemflw1HQdg/KAIhAOdQMxBXJDakIVQIrClq9QAuInd7USOUlKR+cukh1rV8"}]},"maintainers":[{"name":"alicelieutier","email":"alice.lieutier@gmail.com"}]},"0.2.1":{"name":"smoothscroll","version":"0.2.1","description":"A teeny tiny smooth scroll script with ease-in-out effect and no jQuery.","main":"smoothscroll.js","author":{"name":"Alice Lieutier","email":"alice@lieutier.me","url":"http://alice.lieutier.me"},"license":"MIT","homepage":"https://github.com/alicelieutier/smoothScroll#readme","repository":{"type":"git","url":"https://github.com/alicelieutier/smoothScroll.git"},"keywords":["smooth scroll","scroll","no jQuery","anchor"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"4120324c0cb73537d39ec91373daf510e23458f5","bugs":{"url":"https://github.com/alicelieutier/smoothScroll/issues"},"_id":"smoothscroll@0.2.1","_shasum":"520eb494b310da0d7e1c3ed995c486b3be92cd95","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"alicelieutier","email":"alice.lieutier@gmail.com"},"dist":{"shasum":"520eb494b310da0d7e1c3ed995c486b3be92cd95","tarball":"https://registry.npmjs.org/smoothscroll/-/smoothscroll-0.2.1.tgz","integrity":"sha512-5MjgDQluealzLaHRmbmwUVd72XNSx+uChmtZKB8vhKlMG69dO7MjvijUqTayCIEC53mojVDze/GrPCU/fvhhlg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDioh969zGA2Eu9qEgvL+4iPvaRcDeUPk1CQ1HTLwyh9wIhAIq5qHzDO5Bc5Xq5J1aPFC18HjKj6KQtAq9Rq6yKKPO/"}]},"maintainers":[{"name":"alicelieutier","email":"alice.lieutier@gmail.com"}]},"0.2.2":{"name":"smoothscroll","version":"0.2.2","description":"A teeny tiny smooth scroll script with ease-in-out effect and no jQuery.","main":"smoothscroll.js","author":{"name":"Alice Lieutier","email":"alice@lieutier.me","url":"http://alice.lieutier.me"},"license":"MIT","homepage":"https://github.com/alicelieutier/smoothScroll#readme","repository":{"type":"git","url":"https://github.com/alicelieutier/smoothScroll.git"},"keywords":["smooth scroll","scroll","no jQuery","anchor"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"9d578eb3d9d519a16b5e51d8fdd9eac4b657f375","bugs":{"url":"https://github.com/alicelieutier/smoothScroll/issues"},"_id":"smoothscroll@0.2.2","_shasum":"c689e65ce790a5fa77c98dbb5a35250a3af56dbc","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"alicelieutier","email":"alice.lieutier@gmail.com"},"dist":{"shasum":"c689e65ce790a5fa77c98dbb5a35250a3af56dbc","tarball":"https://registry.npmjs.org/smoothscroll/-/smoothscroll-0.2.2.tgz","integrity":"sha512-LZ9p1D9pSpC0akOCgqbnFxNl0wdWCeTu6pDnkJM/yZ6anj7SId1zmuZ/45TJsURHguA2IBVhO8Xnof+aGqNpMw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICIdxTT+/PiD3SGK94VI/67RynPLIEWl1DrIpX01ijCHAiEA5hK7pYudyhAkQDDDRlNI+yzdgZ7hOtkXXA9Hkx/yIqg="}]},"maintainers":[{"name":"alicelieutier","email":"alice.lieutier@gmail.com"}]},"0.3.0":{"name":"smoothscroll","version":"0.3.0","description":"A teeny tiny smooth scroll script with ease-in-out effect and no jQuery.","main":"smoothscroll.js","author":{"name":"Alice Lieutier","email":"alice@lieutier.me","url":"http://alice.lieutier.me"},"license":"MIT","homepage":"https://github.com/alicelieutier/smoothScroll#readme","repository":{"type":"git","url":"git+https://github.com/alicelieutier/smoothScroll.git"},"keywords":["smooth scroll","scroll","no jQuery","anchor"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"f07120e0057461896f2b27e113a4e4b2516b7aed","bugs":{"url":"https://github.com/alicelieutier/smoothScroll/issues"},"_id":"smoothscroll@0.3.0","_shasum":"6e79644d8449c51f29226a833a7440dae9162ed0","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.1","_npmUser":{"name":"alicelieutier","email":"alice.lieutier@gmail.com"},"dist":{"shasum":"6e79644d8449c51f29226a833a7440dae9162ed0","tarball":"https://registry.npmjs.org/smoothscroll/-/smoothscroll-0.3.0.tgz","integrity":"sha512-GATwnriS+rmA6663XDgk16AbpPtVEU+W8VwNAStQPAYgWO3UvxuncOSxywkg8WjyAmvDc/E8YI4PJlALyFX+qw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkt5C1m3jFm8K/GXUfuf+Ue7hk9nID7eodVdLrkw1huwIgHU5i+q+nw3WhkwMBIal/h81TGWqXFlPwnkwZYpjTNgk="}]},"maintainers":[{"name":"alicelieutier","email":"alice.lieutier@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/smoothscroll-0.3.0.tgz_1481821780928_0.8734459937550128"}},"0.4.0":{"name":"smoothscroll","version":"0.4.0","description":"A teeny tiny smooth scroll script with ease-in-out effect and no jQuery.","main":"smoothscroll.js","author":{"name":"Alice Lieutier","email":"alice@lieutier.me","url":"http://alice.lieutier.me"},"license":"MIT","homepage":"https://github.com/alicelieutier/smoothScroll#readme","repository":{"type":"git","url":"git+https://github.com/alicelieutier/smoothScroll.git"},"keywords":["smooth scroll","scroll","no jQuery","anchor"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"efcc177f88cd8c64c0da2faf4decdbfe77810601","bugs":{"url":"https://github.com/alicelieutier/smoothScroll/issues"},"_id":"smoothscroll@0.4.0","_npmVersion":"5.5.1","_nodeVersion":"8.5.0","_npmUser":{"name":"alicelieutier","email":"alice.lieutier@gmail.com"},"dist":{"integrity":"sha512-sggQ3U2Un38b3+q/j1P4Y4fCboCtoUIaBYoge+Lb6Xg1H8RTIif/hugVr+ErMtIDpvBbhQfTjtiTeYAfbw1ZGQ==","shasum":"40e507b46461408ba1b787d0081e1e883c4124a5","tarball":"https://registry.npmjs.org/smoothscroll/-/smoothscroll-0.4.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEtYOM6/bep7kx6lsGmp3M4R1CugIzJqGSPLlXCANxVKAiBPZLlmx2afKyr6tFVMCLODOf70HPDIZlv+Q/4ZA5sFxA=="}]},"maintainers":[{"name":"alicelieutier","email":"alice.lieutier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smoothscroll-0.4.0.tgz_1508251343892_0.6341588434297591"}}},"readme":"smoothScroll\n============\n\nA teeny tiny, standard compliant, smooth scroll script with ease-in-out effect and no dependancy.\n\nsmoothScroll will tie all your internal links to a handler that will produce a smooth scroll to their target instead of an instant jump. It also returns an API that you can use to call a smooth scroll yourself.\n\nThis works in Firefox, Chrome, IE10, Opera and Safari.\nUnsupported browsers would just use the normal internal link behaviour.\n\n\nHow to use\n-\nJust include smoothscroll inside your page, like this:\n\n    <script type=\"text/javascript\" src=\"path/to/smoothscroll.min.js\"></script>\n\nAll your internal links will be tied to a smooth scroll.\nIf you want to call a smooth scroll from your code, you can now use the API by calling:\n\n`window.smoothScroll(target, duration, callback, context)`\n\nwhere:\n* `target` is a `HTMLElement Object` from your document that you want to scroll to, or a numeric position on the page\n* `duration` is the total duration of the scroll (optional, defaults to 500ms)\n* `callback` is a function to be executed when the scrolling is over (optional)\n* `context` is the scrolling context (optional, defaults to window, can be any `HTMLElement Object`)\n\nAlternatively, you can install smoothscroll as a dependency using npm:\n\n```\nnpm install --save smoothscroll\n```\n\nExample usage as a module, binding to a custom element:\n\n```javascript\nvar smoothScroll = require('smoothscroll');\n\nvar exampleBtn = document.querySelector('.example-button');\nvar exampleDestination = document.querySelector('.example-destination');\n\n// This function can easily be an onClick handler in React components\nvar handleClick = function(event) {\n  event.preventDefault();\n\n  smoothScroll(exampleDestination);\n};\n\nexampleBtn.addEventListener('click', handleClick);\n```\n\nsmoothscroll.js\n-\nHere are some indications if you want to tweak the code to fit your needs:\n\nThere is an ease-in-out type timing function. You can change it quite easily in the code. Here is where I found the one I use:\n- http://blog.greweb.fr/2012/02/bezier-curve-based-easing-functions-from-concept-to-implementation/\n\nYou can also change the default duration of a scroll, which is 500ms by default.\n\nMy code is **heavily** commented so you shoudn't lose yourself too much.\n\nExample\n-\nThe example.html file is basically the script applied to a w3c page. I just changed the style so the table of content is fixed to the left.\n\nCheck out the result. Wouldn't it be great if all w3c specs where that easy to navigate in?\n\nSimilar scripts\n-\nWhile I was looking for a name for this script, I found these sites. If this script is not what you need, you might have more luck there:\n- http://www.itnewb.com/tutorial/Creating-the-Smooth-Scroll-Effect-with-JavaScript\n- http://www.kryogenix.org/code/browser/smoothscroll (best cross browser compatibility)\n\nLicense\n-\nThis library is released under the MIT license.\n","maintainers":[{"name":"alicelieutier","email":"alice.lieutier@gmail.com"}],"time":{"modified":"2022-06-26T21:31:22.753Z","created":"2015-06-23T18:41:34.461Z","0.1.0":"2015-06-23T18:41:34.461Z","0.2.0":"2015-09-22T00:18:21.153Z","0.2.1":"2015-09-23T18:52:25.001Z","0.2.2":"2015-10-05T11:15:24.060Z","0.3.0":"2016-12-15T17:09:42.948Z","0.4.0":"2017-10-17T14:42:25.850Z"},"homepage":"https://github.com/alicelieutier/smoothScroll#readme","keywords":["smooth scroll","scroll","no jQuery","anchor"],"repository":{"type":"git","url":"git+https://github.com/alicelieutier/smoothScroll.git"},"author":{"name":"Alice Lieutier","email":"alice@lieutier.me","url":"http://alice.lieutier.me"},"bugs":{"url":"https://github.com/alicelieutier/smoothScroll/issues"},"license":"MIT","readmeFilename":"README.md","users":{"mikebrew":true,"ungurys":true,"alicelieutier":true,"theiades":true,"leonel-ai":true}}