scrollto-js

1.0.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i scrollto-js

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • ganlanyuan