Lightweight Smooth Scroll Library – youscroll.js

Category: Animation , Javascript | May 23, 2017
Views Total:507 views
Official Page:Go to website
Last Update:May 23, 2017


Lightweight Smooth Scroll Library – youscroll.js


Just another scroll to JavaScript library that enables the webpage to smoothly scroll to a specific point (or scroll down to a certain amount of pixels).

Basic usage:

Insert the JavaScript file youscroll.js into the document and the youscroll.js.

<script src="dist/youscroll.js"></script>

Scroll the webpage to a specific selector within the document.

<button onclick="'footer').start()" class="btn btn-primary">Scroll To Bottom</button>

Scroll down the webpage to a certain amount of pixels.

<button onclick="" class="btn btn-primary">Scroll Down By 200px</button>

Execute a callback function when the smooth scrolling ends.

<button onclick="'nav').setCallback(backToTopCallback).start()">Scroll To Top With A Callback</button>
function backToTopCallback() {
  alert("Back to top");

The Default settings to config the smooth scroll effect.

  duration: 1200,
  easing: "easeInOutQuad",
  force: false,
  intervalTime: 5,
  endCallback: undefined

You Might Be Interested In:

Leave a Reply