sublime-scroll
sublime-scroll copied to clipboard
If you're using react, check out https://github.com/demux/react-minimap
sublime-scroll
"Sublime Text 2"-style scroll bars. Renders a visual scroll bar on right side of the webpage using css scaling.
Working demo: http://django.is

Installation
###Requires:
- jQuery (http://jquery.com/)
Settings:
| Option: | Type: | Value: | Default: |
|---|---|---|---|
| top | int | 0 |
|
| bottom | int | 0 |
|
| fixedElements | string | List of css selectors seperated by comma | '' |
| scrollWidth | int | 150 |
|
| scrollHeight | int | function() {return $(window).height() - this.getTop() - this.getBottom();} |
|
| contentWidth | int | function() {return $(document).outerWidth(true);} |
|
| contentHeight | int | function() {return $(document).outerHeight(true);} |
|
| minWidth | int | null |
NOTE: Any setting can be a function. I order to access other settings within a setting, use setting getters i.e. this.getContentWidth() or this.getAnyCamelCaseSetting()
See example.html for example code.
License:
MIT License