1.0.1 • Published 3 years ago

exscroll v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

exScroll

A lightweight javascript plugin for adding a customisable, responsive scrollbar to any overflowing container.

Quick start

Install

This package can be installed with npm: npm install --save exscroll

The required javascript is found at:

<script src="/node_modules/exscroll/dist/exScroll.js">

The required CSS is found at:

<link rel="stylesheet" href="/node_modules/exscroll/dist/exScroll.css">

Usage

The plugin requires the following DOM structure, though the attributes can optionally be replaced by classes during initialisation:

<div exscroll>
	<div exscroll-content></div>
	<div exscroll-scrollbar></div>
</div>

Then the plugin can be initialised with:

exScroll();

Options

Currently, the options are only for the structure, which can be modified with class names:

<div class="wrapper">
	<div class="content"></div>
	<div class="scrollbar"></div>
</div>
exScroll({
	wrapperName:  ".wrapper",
	contentName:  ".content",
	scrollerName: ".scrollbar",
});