Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 711 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 711 Bytes

Horizontal Scroll

A lightweight javascript framework that replaces the default mouse scrolling function with one that scrolls horizontally

How it works

Horizontal Scroll creates an event listener that will trigger when a user scrolls over the selected element. It gathers the mousewheel delta and applies it to the documents scrollLeft property.

Usage

Download and install horizontalscroll.js either by importing or adding horizontalscroll.js to your header

<script src="horizontalscroll.js"></script>
import horizontalScroll from 'horizontalscroll';

Init:

horizontalScroll.init('.selector');

Destroy:

horizontalScroll.destroy();