Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 1.42 KB

File metadata and controls

61 lines (41 loc) · 1.42 KB

Scrollto.js

Overview

Scrolls the page to the given element. Developed with Pure Javascript, without jquery or other libraries.

Live demo

Launch Live Demo

Installing

Use with a CDN

Avaliable soon! We need 200 stars in the repository to be approved on cdnjs. Collaborate!

Download

Download Scrollto.js from GitHub.

Add Script

Simply add the corresponding script to your website/application. No other scripts are needed. Always use minified versions, non-minified versions are only for study/modification. The latest versions are in the "src/currentversion" folder.

scrollto.js

Avaliable soon!

scrollto.min.js

<script src="scrollto.min.js"></script>

Usage

scrollto.js

Avaliable soon!

scrollto.min.js

  1. Add the "scrollto" attribute to the element that will be clicked, set the target element's CSS selector as the attribute value:
<a scrollto = "CSS selector of the target element">
    1. To go to the top of the screen use:
<a scrollto = "body">
  1. If there is a fixed menu at the top just add the "menufixedtop" class:
<div class="menu menufixedtop">

Example code

Launch Live Demo

License

See the LICENSE file.