Need help with zenscroll?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

zengabor
494 Stars 60 Forks The Unlicense 36 Commits 15 Opened issues

Description

A JavaScript module to smooth-scroll web pages and other scrollable elements

Services available

!
?

Need anything else?

Contributors list

# 204,790
JavaScr...
36 commits

Zenscroll

Demo         Download         About         Install         How to use         License

One JavaScript to Smooth-Scroll Them All

Smooth animated scrolling. Move elements into view, or scroll to any vertical position.

1.4 kilobyte of vanilla JavaScript. No dependencies.

About

Zenscroll is a vanilla JavaScript library that enables animated vertical scrolling to an element or position within your document or within a scrollable element (DIV, etc.). It can also automatically smooth all scrolling within the same page.

Features:

  • Smooth animated vertical scrolling.
  • Automatic smooth-scrolling on links within the same page, including back and forward navigation (Chrome, Firefox, Opera, Safari Technology Preview).
  • Scroll to the top of a specific element.
  • Scrolling an element into view, making sure both top & bottom are visible, if possible.
  • Scroll to an element and center it on the screen.
  • Specify the spacing between the element and the edge of the screen (e.g., for fixed navigation bars and footers).
  • Customize the duration of the individual scroll operations.
  • Callback when the scrolling is done.
  • Can use new browser’s built-in smooth-behavior if it’s enabled.
  • Just 1.4 kilobyte minimized & gzipped.
  • No dependencies.

Full support tested and works under:

  • Android Browser 2.2+
  • Chrome for Android
  • Chrome 14+ (probably earlier too)
  • Edge
  • Firefox 9+
  • Internet Explorer 9+
  • iOS Safari 4+
  • Opera 10.6+ (probably earlier too)
  • Safari 4+
  • Windows Phone 8.1
  • Yandex 14.12

Limited support (programmatic animated scroll in document) tested and works under:

  • Firefox 3+
  • Internet Explorer 6+
  • iOS Safari 3+

Getting Started

Installing Zenscroll

Download Zenscroll and include it into your page. A good place is at the very bottom, just before the closing

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.