scrollto-js
v1.0.0
Published
Scrolls to a particular vertical coordinates in the document.
Downloads
15
Readme
scrollTo
Scrolls to a particular vertical coordinates in the document.
Install
bower install scrollTo --save
Usage
Include scrollTo.js in your markup. Call scrollTo
at anytime.
<script type="text/javascript" src="path/to/scrollTo.js"></script>
<script>
var btn = document.querySelector('button');
btn.onclick = function (){
scrollTo(0, 300); // scroll to 0, duration 300 ms
};
</script>
Capability
IE6+
Firefox3.6+
Chrome15+
Opera12.1+
Safari4+
License
This project is available under the MIT license.