An open API service indexing awesome lists of open source software.

https://github.com/believer-ufa/clever-scrollbar

UI Addition to browser scrollbar
https://github.com/believer-ufa/clever-scrollbar

browser-scrollbar javascript scrollbar-plugin

Last synced: 8 months ago
JSON representation

UI Addition to browser scrollbar

Awesome Lists containing this project

README

          

# Clever Scrollbar

Its simple sidebar which helps to navigate on web page.

It is not a replacement of Default Browser Scrollbar. It's an addition to it.

Check example on [believer-ufa.github.io/clever-scrollbar/](https://believer-ufa.github.io/clever-scrollbar/)

## Setup

Add library script

```html

```

Or install from NPM as module:

```bash
npm i clever-scrollbar
```

Add additional attributes to main sections on you page

```html

...

...

...

```

And execute `CleverScrollbar.load()` method after loading all content!

```js
window.addEventListener("load", function() {
CleverScrollbar.load()
})
```

This is all of you need.

## Options

#### Load default stylesheets?

If you want to prevent loading default styles of library, you can use this approach:

```js
CleverScrollbar.load({
loadStyles : false
})
```

## Additional classes

If you need to set some additional classes to one of blocks of sidebar, you can do this with additional attribute:

```

...

```

## Ajax and SPA applications

If you webpage content changed withoud full reload, you can use method `CleverScrollbar.reload()`
to update you sidebar.

## Stopping

Run `CleverScrollbar.stop()` to disable library. You can load it again later.