Get started with jQuery.scrollSpeed CDN

(MIT OR CC0-1.0) licensed

JQuery.scrollSpeed is a lightweight plugin that allows adjusting the animation speed for jQuery scrollTop and animate scrolling functions.

Tags:
  • jquery
  • scrolling
  • easing

Stable version

Copied!

How to start using jQuery.scrollSpeed CDN


$(document).ready(function() {
  $('html, body').scrollSpeed({
    duration: 1000, // scroll duration in milliseconds
    easing: 'easeInOutQuint' // scroll easing
  });

  // Attach scroll event to the window
  $(window).scroll(function() {
    $('html, body').scrollSpeed('scrollTo', 0, 500); // scroll to top with animation
  });
});
Copied!
Copied!
Copied!

All versions