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
- Host: GitHub
- URL: https://github.com/believer-ufa/clever-scrollbar
- Owner: believer-ufa
- Created: 2016-11-14T01:02:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-16T08:07:29.000Z (over 9 years ago)
- Last Synced: 2025-01-13T09:57:13.146Z (over 1 year ago)
- Topics: browser-scrollbar, javascript, scrollbar-plugin
- Language: HTML
- Homepage: https://believer-ufa.github.io/clever-scrollbar/
- Size: 30.3 KB
- Stars: 27
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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.