Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new class: Bootstrap.Affix and the associated behavior * Popovers (and tooltips if you like) can now have their 'trigger' option set to 'click' which allows you to show them on click instead of mouseover if you like. * Delegator.BS.ShowPopup now allows you to just use a #href reference to the id of the popup to show. * Dropdown now allows for you to have its behavior on the Dropdown itself instead of a container. * Bootstrap.Popup now expects that the layout matches Bootstrap 3. *This is a breaking change* but compatibility has been left in place for Bootstrap 2. For this to work, you must set `Bootstrap.version = 2` in your code. * Bootstrap.Popover's offset defaults are now zero unless `Bootstrap.version` == 2
- Loading branch information
Showing
45 changed files
with
25,207 additions
and
14,413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Behavior Filter: Behavior.BS.Affix | ||
=================================== | ||
|
||
A behavior filter to instantiate [Bootstrap](http://twitter.github.com/bootstrap/#affix) Affix functionality. | ||
|
||
### Demo / Fancy Docs | ||
|
||
[http://anutron.github.com/mootools-bootstrap/#affix](http://anutron.github.com/mootools-bootstrap/#affix) | ||
|
||
|
||
### Example | ||
|
||
<a data-behavior="BS.Affix" | ||
data-affix-options=" | ||
'top': 10 | ||
">I stick around!</a> | ||
|
||
### Options | ||
|
||
* top - (*number*) The distance from the top that the user must scroll before the affix class is added and the affix-top class is removed. Defaults to 0. | ||
* bottom - (*number*) The distance from the top that the user must scroll before the affix class is removed and the affix-bottom class is added. Specify a negative number to have it measure from the bottom of the window height. | ||
* classNames - (*object*) The class names to apply in the various states. Defaults to `top: "affix-top", bottom: "affix-bottom", affixed: "affix"`. These should be defined in your CSS as you like. You can also manually affix location for the element using the events listed below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
Class: Bootstrap.Affix {#Bootstrap-Affix} | ||
============================= | ||
|
||
Implements the basic functionality of [Bootstrap](http://anutron.github.com/mootools-bootstrap/#tooltip) Affix which adds a class to an element when it is above, in, and below a given scroll range. | ||
|
||
### Implements | ||
|
||
- [Options][] | ||
- [Events][] | ||
|
||
Bootstrap.Affix Method: constructor | ||
----------------------------- | ||
|
||
### Syntax | ||
|
||
new Bootstrap.Affix(element[, options]); | ||
|
||
### Arguments | ||
|
||
1. element - (*mixed*) A string of the id for an Element or an Element that should be changed when the window scrolls. | ||
2. options - (*object*, optional) a key/value object of options | ||
|
||
### Options | ||
|
||
* top - (*number*) The distance from the top that the user must scroll before the affix class is added and the affix-top class is removed. Defaults to 0. | ||
* bottom - (*number*) The distance from the top that the user must scroll before the affix class is removed and the affix-bottom class is added. Specify a negative number to have it measure from the bottom of the window height. | ||
* classNames - (*object*) The class names to apply in the various states. Defaults to `top: "affix-top", bottom: "affix-bottom", affixed: "affix"`. These should be defined in your CSS as you like. You can also manually affix location for the element using the events listed below. | ||
|
||
### Events | ||
|
||
* pin - (*function*) Fired when the element is below the top and above the bottom (i.e. it is within the scroll boundaries). | ||
* unPin - (*function*) Fired when the element is out of scroll range. If it is below the bottom of the range, this event is passed a boolean `true`. | ||
|
||
Bootstrap.Affix Method: attach {#Bootstrap-Affix:attach} | ||
------------------------------------------------ | ||
|
||
Attach scroll listeners (enable the instance). | ||
|
||
### Syntax | ||
|
||
myAffix.attach(); | ||
|
||
### Returns | ||
|
||
* (*object*) This Bootstrap.Affix instance. | ||
|
||
Bootstrap.Affix Method: detach {#Bootstrap-Affix:detach} | ||
------------------------------------------------ | ||
|
||
Detaches the scroll listeners (disables the instance). | ||
|
||
### Syntax | ||
|
||
myAffix.detach(); | ||
|
||
### Returns | ||
|
||
* (*object*) This Bootstrap.Affix instance. | ||
|
||
Bootstrap.Affix Method: pin {#Bootstrap-Affix:pin} | ||
------------------------------------------------ | ||
|
||
Fires the pin event and adds the pinned-state class. | ||
|
||
### Syntax | ||
|
||
myAffix.pin(); | ||
|
||
### Returns | ||
|
||
* (*object*) This Bootstrap.Affix instance. | ||
|
||
Bootstrap.Affix Method: unpin {#Bootstrap-Affix:unpin} | ||
------------------------------------------------ | ||
|
||
Fires the unPin event and adds the unpinned-state class. | ||
|
||
### Syntax | ||
|
||
myAffix.unpin([isBottom]); | ||
|
||
### Arguments | ||
|
||
1. isBottom - (*boolean*) if `true` adds the bottom-state class. Otherwise the top. | ||
|
||
### Returns | ||
|
||
* (*object*) This Bootstrap.Affix instance. | ||
|
||
[Options]: http;//mootools.net/core/Class/Class.Extras#Options | ||
[Events]: http;//mootools.net/core/Class/Class.Extras#Events |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Oops, something went wrong.