https://github.com/cuth/scrollr
This is a simple javascript scroll bar built for modern browsers.
https://github.com/cuth/scrollr
Last synced: 7 months ago
JSON representation
This is a simple javascript scroll bar built for modern browsers.
- Host: GitHub
- URL: https://github.com/cuth/scrollr
- Owner: cuth
- Created: 2012-10-11T14:05:58.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-05-01T20:07:38.000Z (about 12 years ago)
- Last Synced: 2024-12-28T06:11:55.098Z (over 1 year ago)
- Language: JavaScript
- Size: 320 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
scrollr
=======
This is a simple javascript scroll bar built for modern browsers.
### Requires
* jQuery
* dragger - https://github.com/cuth/dragger
### Use
1. Include the required files
2. Include scrollr.js and scrollr.css
3. Run this code for only non touch devices. Use whatever method you want to detect a touch device.
4. Instantiate the object on an element that has `overflow: scroll`
6. Run `setBarSize` when you have initalized all of you scroll objects. This should be run after every initialize because changing the overflow property can change the size of the element.
### Example
```javascript
if (!("ontouchstart" in window)) {
var sb = new Scrollr('body');
}
```
Add lib/addWheelListener.js for more mouse wheel browser support.