Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kahwee/onescroll

A customizable scrollbar solution for jQuery.
https://github.com/kahwee/onescroll

Last synced: 2 months ago
JSON representation

A customizable scrollbar solution for jQuery.

Awesome Lists containing this project

README

        

## Onescroll

A customizable scrollbar solution for jQuery.

## Dependencies

* [jQuery](http://jquery.com/)
* [jQuery UI](jqueryui.com) (Core, Widget, Mouse and Draggable)
* [jQuery Mousewheel](https://github.com/brandonaaron/jquery-mousewheel)

## Install via Bower

```bash
bower install jquery.onescroll --save
```

## Usage

1. Include jQuery:

```html



```

2. Include plugin's code:

```html


```

3. Call the plugin:

```javascript
$("#element").onescroll({
width: "500px",
height: "300px"
});
```

## Examples

Let's try having four scrollbars, because why not:

```javascript
$("#demo1").onescroll({
height: "200px",
width: "400px",
scrollbars: [{
type: "VerticalLeft",
railPadding: ['2px', '3px'],
railCss: {

}
}, {
type: "VerticalRight",
railPadding: ['40px', '30px'],
railCss: {
}
}, {
type: "HorizontalTop",
railPadding: ['2px', '108px'],
railCss: {
}
}, {
type: "HorizontalBottom",
railPadding: ['2px', '3px'],
railCss: {
visibility: 'hidden'
}
}]
});
```

To access the Onescroll object:

```javascript
yourJQueryElement.data('plugin_onescroll')
```
## Browser support

I have only tested this in the latest browsers.

* Chrome
* Firefox
* Internet Explorer (Only tested in IE10)
* Safari

## Contributing

Check [CONTRIBUTING.md](https://github.com/kahwee/onescroll/blob/master/CONTRIBUTING.md)

## License

MIT License