Skip to content

Commit

Permalink
pulled from adambowen
Browse files Browse the repository at this point in the history
  • Loading branch information
arieh committed Mar 2, 2011
2 parents 8f7b6cc + 893d423 commit 7d658c3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.swp
15 changes: 7 additions & 8 deletions Docs/ScrollerBar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Class: ScrollerBar {#ScrollerBar}
==========================================
This class provides a simple, fully costumizeable interface for creating costum scrollbars both horizontal and vertical.
This class provides a simple, fully customizeable interface for creating custom scrollbars both horizontal and vertical.

ScrollerBar Method: constructor {#ScrollerBar:constructor}
---------------------------------
Expand All @@ -17,25 +17,24 @@ ScrollerBar Method: constructor {#ScrollerBar:constructor}
1. step (`int`) how many pixels to move for each scroll step (default is `30`)
2. mode (`string`) can be either `vertical` or `horizontal`(default is `vertical`)
3. margins (`int`) how many margins to add to the end of the scroll zone (can help fix some issues). default is `0`.
4. scrollerHTML (`string`) - the html used to create the ScrollerBar. If you wish to costumize it, make sure you keep the default class names, or it will break:
4. scrollerHTML (`string`) - the html used to create the ScrollerBar. If you wish to customize it, make sure you keep the default class names, or it will break:
- scroller - the ScrollerBar container
- scroll - the scroll area
- handle - the scroll handle
- increase - the increase button (up/left)
- decrease - the decrease button (down/right)
6. wrapped (`Element` | `String`) - if provided, the class will use this element for creating the scroller effect instead of creating a wrapping element.
5. wrapped (`Element` | `String`) - if provided, the class will use this element for creating the scroller effect instead of creating a wrapping element.

*note: the scroller element will be added with a class representing it's mode (vertical/horizontal) so that you can style it, allowing you to use both types on the same element*



ScrollerBar Method: dettach {#ScrollerBar:dettach}
ScrollerBar Method detach : {#ScrollerBar:detach}
----------------
Dettaches the scroller from the element

### Syntax:

scroller.dettach();
scroller.detach();



Expand All @@ -57,7 +56,7 @@ Advances the scroller

### Syntax:

scroller.inrease([pixels]);
scroller.increase([pixels]);

### Arguments:

Expand All @@ -71,7 +70,7 @@ Regresses the scroller

### Syntax:

scroller.denrease([pixels]);
scroller.decrease([pixels]);

### Arguments:

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ScrollerBar
========
This class provides a simple, fully costumizeable interface for creating costum scrollbars, both horizontal and vertical.
===========
This class provides a simple, fully customizable interface for creating custom scrollbars, both horizontal and vertical.
The class also comes with some default styles that you can play with.

Tested on Firefox 3.6, Chrome 8 and IE7/8

![Screenshot](http://github.com/arieh/ScrollerBar/raw/master/scren.png)
![Screenshot](https://github.com/arieh/ScrollBar/raw/master/screen.png)


How to use
Expand Down
6 changes: 3 additions & 3 deletions Source/ScrollerBar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
---
description: a costume scrollbar provider
description: a custom scrollbar provider
license: MIT-style
Expand Down Expand Up @@ -71,10 +71,10 @@ var params = {
this.axis = (this.options.mode =='vertical') ? 'y' :'x';
this.property = (this.options.mode =='vertical') ? 'height' : 'width';

this.constrcut();
this.construct();
this.attach();
}
, constrcut : function constrcut(){
, construct : function construct(){
this.scroller = {};

var scroller = this.scroller.element = new Element('div',{"class":'scroller',html:this.options.scrollerHtml}).addClass(this.options.mode)
Expand Down
File renamed without changes

0 comments on commit 7d658c3

Please sign in to comment.