1.0.0 • Published 7 years ago

scrollto-js v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

scrollTo

version
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.