From f0d95a4573efdef64598c320962e4b7197f6d5c3 Mon Sep 17 00:00:00 2001 From: Arnold Daniels Date: Wed, 26 Dec 2012 09:35:27 +0100 Subject: [PATCH] Added download button in javascript docs --- docs/assets/css/docs.css | 5 + docs/javascript.html | 2854 ++++++++++----------- docs/templates/pages/javascript.mustache | 2870 +++++++++++----------- 3 files changed, 2883 insertions(+), 2846 deletions(-) diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index 0c905642..564c0b15 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -76,6 +76,11 @@ section > ul li { margin: 40px 0 39px; } +.page-header .header-actions { + line-height: 50px; + padding: 0; +} + /* Faded out hr */ hr.soften { height: 1px; diff --git a/docs/javascript.html b/docs/javascript.html index b8c62f99..6b77e76e 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -79,135 +79,137 @@ -
+
- -
- -
+ +
+ +
- -
- + +
+ -

Individual or compiled

-

Plugins can be included individually (though some have required dependencies), or all at once. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file.

+

Individual or compiled

+

Plugins can be included individually (though some have required dependencies), or all at once. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file.

-

Data attributes

-

You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.

+

Data attributes

+

You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.

-

That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this: -

$('body').off('.data-api')
+

That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this: +

$('body').off('.data-api')
-

Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:

-
$('body').off('.alert.data-api')
+

Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:

+
$('body').off('.alert.data-api')
-

Programmatic API

-

We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.

-
$(".btn.danger").button("toggle").addClass("fat")
-

All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):

-
+        

Programmatic API

+

We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.

+
$(".btn.danger").button("toggle").addClass("fat")
+

All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):

+
 $("#myModal").modal()                       // initialized with defaults
 $("#myModal").modal({ keyboard: false })   // initialized with no keyboard
 $("#myModal").modal('show')                // initializes and invokes show immediately

-
-

Each plugin also exposes its raw constructor on a `Constructor` property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').

+
+

Each plugin also exposes its raw constructor on a `Constructor` property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').

-

No Conflict

-

Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call .noConflict on the plugin you wish to revert the value of.

+

No Conflict

+

Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call .noConflict on the plugin you wish to revert the value of.

-
+        
 var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
 $.fn.bootstrapBtn = bootstrapButton            // give $().bootstrapBtn the bootstrap functionality
-
+
-

Events

-

Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and its past participle form (ex. shown) is trigger on the completion of an action.

-

All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.

-
+        

Events

+

Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and its past participle form (ex. shown) is trigger on the completion of an action.

+

All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.

+
 $('#myModal').on('show', function (e) {
     if (!data) return e.preventDefault() // stops modal from being shown
 })
-
-
+ +
- -
- -

About transitions

-

For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.

-

Use cases

-

A few examples of the transition plugin:

-
    -
  • Sliding or fading in modals
  • -
  • Fading out tabs
  • -
  • Fading out alerts
  • -
  • Sliding carousel panes
  • -
+ +
+ +

About transitions

+

For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.

+

Use cases

+

A few examples of the transition plugin:

+
    +
  • Sliding or fading in modals
  • +
  • Fading out tabs
  • +
  • Fading out alerts
  • +
  • Sliding carousel panes
  • +
-
+
- -
- + +
+ -

Examples

-

Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.

+

Examples

+

Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.

-

Static example

-

A rendered modal with header, body, and set of actions in the footer.

-
-
+ +
- - - -
- + +
+ -

Example in navbar

-

The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.

-
-
+ + + + offset + number + 10 + Pixels to offset from top when calculating position of scroll. + + + + +

Events

+ + + + + + + + + + + + + +
EventDescription
activateThis event fires whenever a new item becomes activated by the scrollspy.
+
- -
- + +
+ -

Example tabs

-

Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.

-
- -
-
-

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

-
-
-

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

-
- - +

Example tabs

+

Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.

+
+ +
+
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+
+
+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+
+ +
+
-
+
-

Usage

-

Enable tabbable tabs via JavaScript (each tab needs to be activated individually):

-
+        

Usage

+

Enable tabbable tabs via JavaScript (each tab needs to be activated individually):

+
 $('#myTab a').click(function (e) {
   e.preventDefault();
   $(this).tab('show');
 })
-

You can activate individual tabs in several ways:

-
+        

You can activate individual tabs in several ways:

+
 $('#myTab a[href="#profile"]').tab('show'); // Select tab by name
 $('#myTab a:first').tab('show'); // Select first tab
 $('#myTab a:last').tab('show'); // Select last tab
 $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
-
+
-

Markup

-

You can activate a tab or pill navigation without writing any JavaScript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the Bootstrap tab styling.

-
+        

Markup

+

You can activate a tab or pill navigation without writing any JavaScript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the Bootstrap tab styling.

+
 <ul class="nav nav-tabs">
   <li><a href="#home" data-toggle="tab">Home</a></li>
   <li><a href="#profile" data-toggle="tab">Profile</a></li>
@@ -706,12 +711,12 @@ $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
   <li><a href="#settings" data-toggle="tab">Settings</a></li>
 </ul>
-

Methods

-

$().tab

-

- Activates a tab element and content container. Tab should have either a data-target or an href targeting a container node in the DOM. -

-
+        

Methods

+

$().tab

+

+ Activates a tab element and content container. Tab should have either a data-target or an href targeting a container node in the DOM. +

+
 <ul class="nav nav-tabs" id="myTab">
   <li class="active"><a href="#home">Home</a></li>
   <li><a href="#profile">Profile</a></li>
@@ -731,155 +736,156 @@ $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
     $('#myTab a:last').tab('show');
   })
 </script>
-
+
-

Events

- - - - - - - - - - - +

Events

+
EventDescription
showThis event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
+ + + + + + + + + + - - - - -
EventDescription
showThis event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
shownThis event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
-
+              shown
+              This event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
+            
+          
+        
+        
 $('a[data-toggle="tab"]').on('shown', function (e) {
   e.target // activated tab
   e.relatedTarget // previous tab
 })
-
-
+ +
- -
- + +
+ -

Examples

-

Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.

-

Hover over the links below to see tooltips:

-
-

Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral. -

-
+

Examples

+

Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.

+

Hover over the links below to see tooltips:

+
+

Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral. +

+
-

Four directions

- +

Four directions

+ -
+
-

Usage

-

Trigger the tooltip via JavaScript:

-
$('#example').tooltip(options)
+

Usage

+

Trigger the tooltip via JavaScript:

+
$('#example').tooltip(options)
-

Options

-

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
Nametypedefaultdescription
animationbooleantrueapply a css fade transition to the tooltip
htmlbooleanfalseInsert html into the tooltip. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.
placementstring|function'top'how to position the tooltip - top | bottom | left | right
selectorstringfalseIf a selector is provided, tooltip objects will be delegated to the specified targets.
titlestring | function''default title value if `title` tag isn't present
triggerstring'hover'how tooltip is triggered - click | hover | focus | manual
delaynumber | object0 +

Options

+

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
Nametypedefaultdescription
animationbooleantrueapply a css fade transition to the tooltip
htmlbooleanfalseInsert html into the tooltip. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.
placementstring|function'top'how to position the tooltip - top | bottom | left | right
selectorstringfalseIf a selector is provided, tooltip objects will be delegated to the specified targets.
titlestring | function''default title value if `title` tag isn't present
triggerstring'hover'how tooltip is triggered - click | hover | focus | manual
delaynumber | object0

delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

If a number is supplied, delay is applied to both hide/show

Object structure is: delay: { show: 500, hide: 100 }

-
-
- Heads up! - Options for individual tooltips can alternatively be specified through the use of data attributes. -
+
+
+ Heads up! + Options for individual tooltips can alternatively be specified through the use of data attributes. +
-

Markup

-

For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.

-
<a href="#" rel="tooltip" title="first tooltip">hover over me</a>
+

Markup

+

For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.

+
<a href="#" rel="tooltip" title="first tooltip">hover over me</a>
-

Methods

-

$().tooltip(options)

-

Attaches a tooltip handler to an element collection.

-

.tooltip('show')

-

Reveals an element's tooltip.

-
$('#element').tooltip('show')
-

.tooltip('hide')

-

Hides an element's tooltip.

-
$('#element').tooltip('hide')
-

.tooltip('toggle')

-

Toggles an element's tooltip.

-
$('#element').tooltip('toggle')
-

.tooltip('destroy')

-

Hides and destroys an element's tooltip.

-
$('#element').tooltip('destroy')
-
+

Methods

+

$().tooltip(options)

+

Attaches a tooltip handler to an element collection.

+

.tooltip('show')

+

Reveals an element's tooltip.

+
$('#element').tooltip('show')
+

.tooltip('hide')

+

Hides an element's tooltip.

+
$('#element').tooltip('hide')
+

.tooltip('toggle')

+

Toggles an element's tooltip.

+
$('#element').tooltip('toggle')
+

.tooltip('destroy')

+

Hides and destroys an element's tooltip.

+
$('#element').tooltip('destroy')
+
@@ -887,6 +893,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) { ================================================== -->
@@ -959,66 +966,66 @@ $('a[data-toggle="tab"]').on('shown', function (e) {

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

- - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
Nametypedefaultdescription
animationbooleantrueapply a css fade transition to the tooltip
htmlbooleanfalseInsert html into the popover. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.
placementstring|function'right'how to position the popover - top | bottom | left | right
selectorstringfalseif a selector is provided, tooltip objects will be delegated to the specified targets
triggerstring'click'how popover is triggered - click | hover | focus | manual
titlestring | function''default title value if `title` attribute isn't present
contentstring | function''default content value if `data-content` attribute isn't present
delaynumber | object0 -

delay showing and hiding the popover (ms) - does not apply to manual trigger type

-

If a number is supplied, delay is applied to both hide/show

-

Object structure is: delay: { show: 500, hide: 100 }

-
animationbooleantrueapply a css fade transition to the tooltip
htmlbooleanfalseInsert html into the popover. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.
placementstring|function'right'how to position the popover - top | bottom | left | right
selectorstringfalseif a selector is provided, tooltip objects will be delegated to the specified targets
triggerstring'click'how popover is triggered - click | hover | focus | manual
titlestring | function''default title value if `title` attribute isn't present
contentstring | function''default content value if `data-content` attribute isn't present
delaynumber | object0 +

delay showing and hiding the popover (ms) - does not apply to manual trigger type

+

If a number is supplied, delay is applied to both hide/show

+

Object structure is: delay: { show: 500, hide: 100 }

+
@@ -1052,6 +1059,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) { ================================================== -->
@@ -1100,189 +1108,191 @@ $('a[data-toggle="tab"]').on('shown', function (e) {

Bootstrap's alert class exposes a few events for hooking into alert functionality.

- - - - + + + + - - - - - - - - + + + + + + + +
EventDescription
EventDescription
closeThis event fires immediately when the close instance method is called.
closedThis event is fired when the alert has been closed (will wait for css transitions to complete).
closeThis event fires immediately when the close instance method is called.
closedThis event is fired when the alert has been closed (will wait for css transitions to complete).
-
+        
 $('#my-alert').bind('closed', function () {
   // do something…
 })
-
+
- -
- + +
+ -

Example uses

-

Do more with buttons. Control button states or create groups of buttons for more components like toolbars.

+

Example uses

+

Do more with buttons. Control button states or create groups of buttons for more components like toolbars.

-

Stateful

-

Add data-loading-text="Loading..." to use a loading state on a button.

-
- -
-
<button type="button" class="btn btn-primary" data-loading-text="Loading...">Loading state</button>
+

Stateful

+

Add data-loading-text="Loading..." to use a loading state on a button.

+
+ +
+
<button type="button" class="btn btn-primary" data-loading-text="Loading...">Loading state</button>
-

Single toggle

-

Add data-toggle="button" to activate toggling on a single button.

-
- -
-
<button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button>
+

Single toggle

+

Add data-toggle="button" to activate toggling on a single button.

+
+ +
+
<button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button>
-

Checkbox

-

Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group.

-
-
- - - -
-
-
+        

Checkbox

+

Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group.

+
+
+ + + +
+
+
 <div class="btn-group" data-toggle="buttons-checkbox">
   <button type="button" class="btn btn-primary">Left</button>
   <button type="button" class="btn btn-primary">Middle</button>
   <button type="button" class="btn btn-primary">Right</button>
 </div>
-
+
-

Radio

-

Add data-toggle="buttons-radio" for radio style toggling on btn-group.

-
-
- - - -
-
-
+        

Radio

+

Add data-toggle="buttons-radio" for radio style toggling on btn-group.

+
+
+ + + +
+
+
 <div class="btn-group" data-toggle="buttons-radio">
   <button type="button" class="btn btn-primary">Left</button>
   <button type="button" class="btn btn-primary">Middle</button>
   <button type="button" class="btn btn-primary">Right</button>
 </div>
-
+
-
+
-

Usage

-

Enable buttons via JavaScript:

-
$('.nav-tabs').button()
+

Usage

+

Enable buttons via JavaScript:

+
$('.nav-tabs').button()
-

Markup

-

Data attributes are integral to the button plugin. Check out the example code below for the various markup types.

+

Markup

+

Data attributes are integral to the button plugin. Check out the example code below for the various markup types.

-

Options

-

None

+

Options

+

None

-

Methods

-

$().button('toggle')

-

Toggles push state. Gives the button the appearance that it has been activated.

-
- Heads up! - You can enable auto toggling of a button by using the data-toggle attribute. -
-
<button type="button" class="btn" data-toggle="button" >…</button>
-

$().button('loading')

-

Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text. -

-
<button type="button" class="btn" data-loading-text="loading stuff..." >...</button>
-
- Heads up! - Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off". -
-

$().button('reset')

-

Resets button state - swaps text to original text.

-

$().button(string)

-

Resets button state - swaps text to any data defined text state.

-
<button type="button" class="btn" data-complete-text="finished!" >...</button>
+        

Methods

+

$().button('toggle')

+

Toggles push state. Gives the button the appearance that it has been activated.

+
+ Heads up! + You can enable auto toggling of a button by using the data-toggle attribute. +
+
<button type="button" class="btn" data-toggle="button" >…</button>
+

$().button('loading')

+

Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text. +

+
<button type="button" class="btn" data-loading-text="loading stuff..." >...</button>
+
+ Heads up! + Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off". +
+

$().button('reset')

+

Resets button state - swaps text to original text.

+

$().button(string)

+

Resets button state - swaps text to any data defined text state.

+
<button type="button" class="btn" data-complete-text="finished!" >...</button>
 <script>
   $('.btn').button('complete')
 </script>
-
-
+ +
- -
- + +
+ -

About

-

Get base styles and flexible support for collapsible components like accordions and navigation.

-

* Requires the Transitions plugin to be included.

+

About

+

Get base styles and flexible support for collapsible components like accordions and navigation.

+

* Requires the Transitions plugin to be included.

-

Example accordion

-

Using the collapse plugin, we built a simple accordion style widget:

+

Example accordion

+

Using the collapse plugin, we built a simple accordion style widget:

-
-
-
- -
-
- Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
-
-
-
- -
-
- Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
-
-
-
- -
-
- Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
-
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
-
+            
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+
+
 <div class="accordion" id="accordion2">
   <div class="accordion-group">
     <div class="accordion-heading">
@@ -1310,150 +1320,151 @@ $('#my-alert').bind('closed', function () {
   </div>
 </div>
 ...
-
-

You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.

-
+        
+

You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.

+
 <button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo">
   simple collapsible
 </button>
 
 <div id="demo" class="collapse in"> … </div>
-
+ -
+
-

Usage

+

Usage

-

Via data attributes

-

Just add data-toggle="collapse" and a data-target to element to automatically assign control of a collapsible element. The data-target attribute accepts a css selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.

-

To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action.

+

Via data attributes

+

Just add data-toggle="collapse" and a data-target to element to automatically assign control of a collapsible element. The data-target attribute accepts a css selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.

+

To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action.

-

Via JavaScript

-

Enable manually with:

-
$(".collapse").collapse()
+

Via JavaScript

+

Enable manually with:

+
$(".collapse").collapse()
-

Options

-

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-parent="".

- - - - - - - - - - - - - - - - - - - - - - - -
Nametypedefaultdescription
parentselectorfalseIf selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior)
togglebooleantrueToggles the collapsible element on invocation
+

Options

+

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-parent="".

+ + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
parentselectorfalseIf selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior)
togglebooleantrueToggles the collapsible element on invocation
-

Methods

-

.collapse(options)

-

Activates your content as a collapsible element. Accepts an optional options object. -

+        

Methods

+

.collapse(options)

+

Activates your content as a collapsible element. Accepts an optional options object. +

 $('#myCollapsible').collapse({
   toggle: false
 })
-
-

.collapse('toggle')

-

Toggles a collapsible element to shown or hidden.

-

.collapse('show')

-

Shows a collapsible element.

-

.collapse('hide')

-

Hides a collapsible element.

+
+

.collapse('toggle')

+

Toggles a collapsible element to shown or hidden.

+

.collapse('show')

+

Shows a collapsible element.

+

.collapse('hide')

+

Hides a collapsible element.

-

Events

-

Bootstrap's collapse class exposes a few events for hooking into collapse functionality.

- - - - - - - - - - - - - - - - - - - - - - - - - -
EventDescription
showThis event fires immediately when the show instance method is called.
shownThis event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).
hide - This event is fired immediately when the hide method has been called. -
hiddenThis event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).
-
+        

Events

+

Bootstrap's collapse class exposes a few events for hooking into collapse functionality.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
EventDescription
showThis event fires immediately when the show instance method is called.
shownThis event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).
hide + This event is fired immediately when the hide method has been called. +
hiddenThis event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).
+
 $('#myCollapsible').on('hidden', function () {
   // do something…
 })
-
+
- - - - - -
- + +
+ -
Heads up! This version of typeahead superseeds the original one and supports AJAX and key/value pairs.
+
Heads up! This version of typeahead superseeds the original one and supports AJAX and key/value pairs.
-

Example

-

A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.

-
- -
-
<input type="text" data-provide="typeahead">
+

Example

+

A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.

+
+ +
+
<input type="text" data-provide="typeahead">
-
- -
-
+        
+ +
+
 <select class="span3" data-provide="typeahead" data-items="4">
   <option value="AL">Alabama</option>
   <option value="AK">Alaska</option>
@@ -1707,221 +1720,223 @@ $('.carousel').carousel({
   <option value="CT">Connecticut</option>
   ...
 </select>
-
- -
+
+ +
-

Usage

+

Usage

-

Via data attributes

-

Add data attributes to register an element with typeahead functionality as shown in the example above.

+

Via data attributes

+

Add data attributes to register an element with typeahead functionality as shown in the example above.

-

Via JavaScript

-

Call the typeahead manually with:

-
$('.typeahead').typeahead()
+

Via JavaScript

+

Call the typeahead manually with:

+
$('.typeahead').typeahead()
-

Options

-

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-source="".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Nametypedefaultdescription
sourcearray, object, string, function[ ]The data source to query against. May be an array of strings, an object as key/value pairs, a url (string) or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.
itemsnumber8The max number of items to display in the dropdown.
minLengthnumber1The minimum character length needed before triggering autocomplete suggestions
ajaxdelaynumber400The time between typing and doing an AJAX request. Limiting the number of requests for fast typers.
matcherfunctioncase insensitiveThe method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.
sorterfunctionexact match,
case sensitive,
case insensitive
Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.
updaterfunctionreturns selected itemThe method used to return selected item. Accepts a single argument, the item and has the scope of the typeahead instance.
highlighterfunctionhighlights all default matchesMethod used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.
+

Options

+

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-source="".

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
sourcearray, object, string, function[ ]The data source to query against. May be an array of strings, an object as key/value pairs, a url (string) or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.
itemsnumber8The max number of items to display in the dropdown.
minLengthnumber1The minimum character length needed before triggering autocomplete suggestions
ajaxdelaynumber400The time between typing and doing an AJAX request. Limiting the number of requests for fast typers.
matcherfunctioncase insensitiveThe method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.
sorterfunctionexact match,
case sensitive,
case insensitive
Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.
updaterfunctionreturns selected itemThe method used to return selected item. Accepts a single argument, the item and has the scope of the typeahead instance.
highlighterfunctionhighlights all default matchesMethod used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.
-

Methods

-

.typeahead(options)

-

Initializes an input with a typeahead.

- -

Result

-

If the source are key/value pairs, the data-value attribute will contain the key.

-
+

Methods

+

.typeahead(options)

+

Initializes an input with a typeahead.

+ +

Result

+

If the source are key/value pairs, the data-value attribute will contain the key.

+
- -
- + +
+ -

Example

-

Input masks can be used to force the user to enter data conform a specific format.

-

Unlike validation, the user can't enter any other key than the ones specified by the mask.

-
- -
-
+        

Example

+

Input masks can be used to force the user to enter data conform a specific format.

+

Unlike validation, the user can't enter any other key than the ones specified by the mask.

+
+ +
+
 <input type="text" data-mask="999-99-999-9999-9">
-
+
-
+
-

Usage

+

Usage

-

Via data attributes

-

Add data attributes to register an element with inputmask functionality as shown in the example above.

+

Via data attributes

+

Add data attributes to register an element with inputmask functionality as shown in the example above.

-

Via JavaScript

-

Call the input mask via javascript:

-
$('.inputmask').inputmask()
+

Via JavaScript

+

Call the input mask via javascript:

+
$('.inputmask').inputmask()
-

Options

- - - - - - - - - - - - - - - - - - - - - - - -
Nametypedefaultdescription
maskstring''A string of formatting and literal characters, defining the input mask (see below).
placeholderstring'_'The character that is displayed where something needs to be typed.
+

Options

+ + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
maskstring''A string of formatting and literal characters, defining the input mask (see below).
placeholderstring'_'The character that is displayed where something needs to be typed.
-

Format

- - - - - - - - - - -
CharacterDescription
9Number
aLetter
?Alphanumeric
*Any character
+

Format

+ + + + + + + + + + +
CharacterDescription
9Number
aLetter
?Alphanumeric
*Any character
-

Methods

-

.inputmask(options)

-

Initializes an input with an input mask.

-
+

Methods

+

.inputmask(options)

+

Initializes an input with an input mask.

+
- -
-
- -
- + +
+ -

Example

-

The subnavigation on the left is a live demo of the affix plugin.

+

Example

+

The subnavigation on the left is a live demo of the affix plugin.

-
+
-

Usage

+

Usage

-

Via data attributes

-

To easily add affix behavior to any element, just add data-spy="affix" to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.

+

Via data attributes

+

To easily add affix behavior to any element, just add data-spy="affix" to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.

-
<div data-spy="affix" data-offset-top="200">...</div>
+
<div data-spy="affix" data-offset-top="200">...</div>
-
- Heads up! - You must manage the position of a pinned element and the behavior of its immediate parent. Position is controlled by affix, affix-top, and affix-bottom. Remember to check for a potentially collapsed parent when the affix kicks in as it's removing content from the normal flow of the page. -
+
+ Heads up! + You must manage the position of a pinned element and the behavior of its immediate parent. Position is controlled by affix, affix-top, and affix-bottom. Remember to check for a potentially collapsed parent when the affix kicks in as it's removing content from the normal flow of the page. +
-

Via JavaScript

-

Call the affix plugin via JavaScript:

-
$('#navbar').affix()
+

Via JavaScript

+

Call the affix plugin via JavaScript:

+
$('#navbar').affix()
-

Methods

-

.affix('refresh')

-

When using affix in conjunction with adding or removing of elements from the DOM, you'll want to call the refresh method:

-
+        

Methods

+

.affix('refresh')

+

When using affix in conjunction with adding or removing of elements from the DOM, you'll want to call the refresh method:

+
 $('[data-spy="affix"]').each(function () {
   $(this).affix('refresh')
 });
-
-

Options

-

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset-top="200".

- - - - - - - - - - - - - - - - - -
Nametypedefaultdescription
offsetnumber | function | object10Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and left directions. To listen for a single direction, or multiple unique offsets, just provide an object offset: { x: 10 }. Use a function when you need to dynamically provide an offset (useful for some responsive designs).
-
+ +

Options

+

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset-top="200".

+ + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
offsetnumber | function | object10Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and left directions. To listen for a single direction, or multiple unique offsets, just provide an object offset: { x: 10 }. Use a function when you need to dynamically provide an offset (useful for some responsive designs).
+
-
-
+
+ -
- -
+ +
+ +
- -
- + +
+ -

{{_i}}Individual or compiled{{/i}}

-

{{_i}}Plugins can be included individually (though some have required dependencies), or all at once. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file.{{/i}}

+

{{_i}}Individual or compiled{{/i}}

+

{{_i}}Plugins can be included individually (though some have required dependencies), or all at once. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file.{{/i}}

-

{{_i}}Data attributes{{/i}}

-

{{_i}}You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.{{/i}}

+

{{_i}}Data attributes{{/i}}

+

{{_i}}You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.{{/i}}

-

{{_i}}That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:{{/i}} -

$('body').off('.data-api')
+

{{_i}}That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:{{/i}} +

$('body').off('.data-api')
-

{{_i}}Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:{{/i}}

-
$('body').off('.alert.data-api')
+

{{_i}}Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:{{/i}}

+
$('body').off('.alert.data-api')
-

{{_i}}Programmatic API{{/i}}

-

{{_i}}We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.{{/i}}

-
$(".btn.danger").button("toggle").addClass("fat")
-

{{_i}}All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):{{/i}}

-
+        

{{_i}}Programmatic API{{/i}}

+

{{_i}}We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.{{/i}}

+
$(".btn.danger").button("toggle").addClass("fat")
+

{{_i}}All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):{{/i}}

+
 $("#myModal").modal()                       // initialized with defaults
 $("#myModal").modal({ keyboard: false })   // initialized with no keyboard
 $("#myModal").modal('show')                // initializes and invokes show immediately

-
-

{{_i}}Each plugin also exposes its raw constructor on a `Constructor` property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').{{/i}}

+
+

{{_i}}Each plugin also exposes its raw constructor on a `Constructor` property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').{{/i}}

-

{{_i}}No Conflict{{/i}}

-

{{_i}}Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call .noConflict on the plugin you wish to revert the value of.{{/i}}

+

{{_i}}No Conflict{{/i}}

+

{{_i}}Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call .noConflict on the plugin you wish to revert the value of.{{/i}}

-
+        
 var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
 $.fn.bootstrapBtn = bootstrapButton            // give $().bootstrapBtn the bootstrap functionality
-
+
-

{{_i}}Events{{/i}}

-

{{_i}}Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and its past participle form (ex. shown) is trigger on the completion of an action.{{/i}}

-

{{_i}}All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.{{/i}}

-
+        

{{_i}}Events{{/i}}

+

{{_i}}Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and its past participle form (ex. shown) is trigger on the completion of an action.{{/i}}

+

{{_i}}All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.{{/i}}

+
 $('#myModal').on('show', function (e) {
     if (!data) return e.preventDefault() // stops modal from being shown
 })
-
-
+ +
- -
- -

{{_i}}About transitions{{/i}}

-

{{_i}}For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.{{/i}}

-

{{_i}}Use cases{{/i}}

-

{{_i}}A few examples of the transition plugin:{{/i}}

-
    -
  • {{_i}}Sliding or fading in modals{{/i}}
  • -
  • {{_i}}Fading out tabs{{/i}}
  • -
  • {{_i}}Fading out alerts{{/i}}
  • -
  • {{_i}}Sliding carousel panes{{/i}}
  • -
+ +
+ +

{{_i}}About transitions{{/i}}

+

{{_i}}For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.{{/i}}

+

{{_i}}Use cases{{/i}}

+

{{_i}}A few examples of the transition plugin:{{/i}}

+
    +
  • {{_i}}Sliding or fading in modals{{/i}}
  • +
  • {{_i}}Fading out tabs{{/i}}
  • +
  • {{_i}}Fading out alerts{{/i}}
  • +
  • {{_i}}Sliding carousel panes{{/i}}
  • +
- {{! Ideas: include docs for .fade.in, .slide.in, etc }} -
+ {{! Ideas: include docs for .fade.in, .slide.in, etc }} +
- -
- + +
+ -

{{_i}}Examples{{/i}}

-

{{_i}}Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.{{/i}}

+

{{_i}}Examples{{/i}}

+

{{_i}}Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.{{/i}}

-

{{_i}}Static example{{/i}}

-

{{_i}}A rendered modal with header, body, and set of actions in the footer.{{/i}}

-
- {{! /example }} +
 <div class="modal hide fade">
   <div class="modal-header">
     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
@@ -151,46 +153,46 @@ $('#myModal').on('show', function (e) {
     <a href="#" class="btn btn-primary">{{_i}}Save changes{{/i}}</a>
   </div>
 </div>
-
+ -

{{_i}}Live demo{{/i}}

-

{{_i}}Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.{{/i}}

- -
+ +
- - - -
- + +
+ -

{{_i}}Example in navbar{{/i}}

-

{{_i}}The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.{{/i}}

-
-
+ + + + {{_i}}offset{{/i}} + {{_i}}number{{/i}} + {{_i}}10{{/i}} + {{_i}}Pixels to offset from top when calculating position of scroll.{{/i}} + + + + +

{{_i}}Events{{/i}}

+ + + + + + + + + + + + + +
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}activate{{/i}}{{_i}}This event fires whenever a new item becomes activated by the scrollspy.{{/i}}
+
- -
- + +
+ -

{{_i}}Example tabs{{/i}}

-

{{_i}}Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.{{/i}}

-
- -
-
-

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

-
-
-

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

-
- - +

{{_i}}Example tabs{{/i}}

+

{{_i}}Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.{{/i}}

+
+ +
+
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

-
{{! /example }} +
+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+
+ + +
+
{{! /example }} -
+
-

{{_i}}Usage{{/i}}

-

{{_i}}Enable tabbable tabs via JavaScript (each tab needs to be activated individually):{{/i}}

-
+        

{{_i}}Usage{{/i}}

+

{{_i}}Enable tabbable tabs via JavaScript (each tab needs to be activated individually):{{/i}}

+
 $('#myTab a').click(function (e) {
   e.preventDefault();
   $(this).tab('show');
 })
-

{{_i}}You can activate individual tabs in several ways:{{/i}}

-
+        

{{_i}}You can activate individual tabs in several ways:{{/i}}

+
 $('#myTab a[href="#profile"]').tab('show'); // Select tab by name
 $('#myTab a:first').tab('show'); // Select first tab
 $('#myTab a:last').tab('show'); // Select last tab
 $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
-
+
-

{{_i}}Markup{{/i}}

-

{{_i}}You can activate a tab or pill navigation without writing any JavaScript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the Bootstrap tab styling.{{/i}}

-
+        

{{_i}}Markup{{/i}}

+

{{_i}}You can activate a tab or pill navigation without writing any JavaScript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the Bootstrap tab styling.{{/i}}

+
 <ul class="nav nav-tabs">
   <li><a href="#home" data-toggle="tab">{{_i}}Home{{/i}}</a></li>
   <li><a href="#profile" data-toggle="tab">{{_i}}Profile{{/i}}</a></li>
@@ -636,12 +641,12 @@ $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
   <li><a href="#settings" data-toggle="tab">{{_i}}Settings{{/i}}</a></li>
 </ul>
-

{{_i}}Methods{{/i}}

-

$().tab

-

- {{_i}}Activates a tab element and content container. Tab should have either a data-target or an href targeting a container node in the DOM.{{/i}} -

-
+        

{{_i}}Methods{{/i}}

+

$().tab

+

+ {{_i}}Activates a tab element and content container. Tab should have either a data-target or an href targeting a container node in the DOM.{{/i}} +

+
 <ul class="nav nav-tabs" id="myTab">
   <li class="active"><a href="#home">{{_i}}Home{{/i}}</a></li>
   <li><a href="#profile">{{_i}}Profile{{/i}}</a></li>
@@ -661,155 +666,156 @@ $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
     $('#myTab a:last').tab('show');
   })
 </script>
-
+
-

{{_i}}Events{{/i}}

- - - - - - - - - - - +

{{_i}}Events{{/i}}

+
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}show{{/i}}{{_i}}This event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.{{/i}}
+ + + + + + + + + + - - - - -
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}show{{/i}}{{_i}}This event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.{{/i}}
{{_i}}shown{{/i}}{{_i}}This event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.{{/i}}
-
+              {{_i}}shown{{/i}}
+              {{_i}}This event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.{{/i}}
+            
+          
+        
+        
 $('a[data-toggle="tab"]').on('shown', function (e) {
   e.target // activated tab
   e.relatedTarget // previous tab
 })
-
-
+ +
- -
- + +
+ -

{{_i}}Examples{{/i}}

-

{{_i}}Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.{{/i}}

-

{{_i}}Hover over the links below to see tooltips:{{/i}}

-
-

{{_i}}Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.{{/i}} -

-
{{! /example }} +

{{_i}}Examples{{/i}}

+

{{_i}}Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.{{/i}}

+

{{_i}}Hover over the links below to see tooltips:{{/i}}

+
+

{{_i}}Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.{{/i}} +

+
{{! /example }} -

{{_i}}Four directions{{/i}}

- {{! /example }} +

{{_i}}Four directions{{/i}}

+ {{! /example }} -
+
-

{{_i}}Usage{{/i}}

-

{{_i}}Trigger the tooltip via JavaScript:{{/i}}

-
$('#example').tooltip({{_i}}options{{/i}})
+

{{_i}}Usage{{/i}}

+

{{_i}}Trigger the tooltip via JavaScript:{{/i}}

+
$('#example').tooltip({{_i}}options{{/i}})
-

{{_i}}Options{{/i}}

-

{{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".{{/i}}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}animation{{/i}}{{_i}}boolean{{/i}}true{{_i}}apply a css fade transition to the tooltip{{/i}}
{{_i}}html{{/i}}{{_i}}boolean{{/i}}false{{_i}}Insert html into the tooltip. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.{{/i}}
{{_i}}placement{{/i}}{{_i}}string|function{{/i}}'top'{{_i}}how to position the tooltip{{/i}} - top | bottom | left | right
{{_i}}selector{{/i}}{{_i}}string{{/i}}false{{_i}}If a selector is provided, tooltip objects will be delegated to the specified targets.{{/i}}
{{_i}}title{{/i}}{{_i}}string | function{{/i}}''{{_i}}default title value if `title` tag isn't present{{/i}}
{{_i}}trigger{{/i}}{{_i}}string{{/i}}'hover'{{_i}}how tooltip is triggered{{/i}} - click | hover | focus | manual
{{_i}}delay{{/i}}{{_i}}number | object{{/i}}0 +

{{_i}}Options{{/i}}

+

{{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}animation{{/i}}{{_i}}boolean{{/i}}true{{_i}}apply a css fade transition to the tooltip{{/i}}
{{_i}}html{{/i}}{{_i}}boolean{{/i}}false{{_i}}Insert html into the tooltip. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.{{/i}}
{{_i}}placement{{/i}}{{_i}}string|function{{/i}}'top'{{_i}}how to position the tooltip{{/i}} - top | bottom | left | right
{{_i}}selector{{/i}}{{_i}}string{{/i}}false{{_i}}If a selector is provided, tooltip objects will be delegated to the specified targets.{{/i}}
{{_i}}title{{/i}}{{_i}}string | function{{/i}}''{{_i}}default title value if `title` tag isn't present{{/i}}
{{_i}}trigger{{/i}}{{_i}}string{{/i}}'hover'{{_i}}how tooltip is triggered{{/i}} - click | hover | focus | manual
{{_i}}delay{{/i}}{{_i}}number | object{{/i}}0

{{_i}}delay showing and hiding the tooltip (ms) - does not apply to manual trigger type{{/i}}

{{_i}}If a number is supplied, delay is applied to both hide/show{{/i}}

{{_i}}Object structure is: delay: { show: 500, hide: 100 }{{/i}}

-
-
- {{_i}}Heads up!{{/i}} - {{_i}}Options for individual tooltips can alternatively be specified through the use of data attributes.{{/i}} -
+
+
+ {{_i}}Heads up!{{/i}} + {{_i}}Options for individual tooltips can alternatively be specified through the use of data attributes.{{/i}} +
-

{{_i}}Markup{{/i}}

-

{{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}}

-
<a href="#" rel="tooltip" title="{{_i}}first tooltip{{/i}}">{{_i}}hover over me{{/i}}</a>
+

{{_i}}Markup{{/i}}

+

{{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}}

+
<a href="#" rel="tooltip" title="{{_i}}first tooltip{{/i}}">{{_i}}hover over me{{/i}}</a>
-

{{_i}}Methods{{/i}}

-

$().tooltip({{_i}}options{{/i}})

-

{{_i}}Attaches a tooltip handler to an element collection.{{/i}}

-

.tooltip('show')

-

{{_i}}Reveals an element's tooltip.{{/i}}

-
$('#element').tooltip('show')
-

.tooltip('hide')

-

{{_i}}Hides an element's tooltip.{{/i}}

-
$('#element').tooltip('hide')
-

.tooltip('toggle')

-

{{_i}}Toggles an element's tooltip.{{/i}}

-
$('#element').tooltip('toggle')
-

.tooltip('destroy')

-

{{_i}}Hides and destroys an element's tooltip.{{/i}}

-
$('#element').tooltip('destroy')
-
+

{{_i}}Methods{{/i}}

+

$().tooltip({{_i}}options{{/i}})

+

{{_i}}Attaches a tooltip handler to an element collection.{{/i}}

+

.tooltip('show')

+

{{_i}}Reveals an element's tooltip.{{/i}}

+
$('#element').tooltip('show')
+

.tooltip('hide')

+

{{_i}}Hides an element's tooltip.{{/i}}

+
$('#element').tooltip('hide')
+

.tooltip('toggle')

+

{{_i}}Toggles an element's tooltip.{{/i}}

+
$('#element').tooltip('toggle')
+

.tooltip('destroy')

+

{{_i}}Hides and destroys an element's tooltip.{{/i}}

+
$('#element').tooltip('destroy')
+
@@ -817,6 +823,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) { ================================================== -->
@@ -889,66 +896,66 @@ $('a[data-toggle="tab"]').on('shown', function (e) {

{{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".{{/i}}

- - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}animation{{/i}}{{_i}}boolean{{/i}}true{{_i}}apply a css fade transition to the tooltip{{/i}}
{{_i}}html{{/i}}{{_i}}boolean{{/i}}false{{_i}}Insert html into the popover. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.{{/i}}
{{_i}}placement{{/i}}{{_i}}string|function{{/i}}'right'{{_i}}how to position the popover{{/i}} - top | bottom | left | right
{{_i}}selector{{/i}}{{_i}}string{{/i}}false{{_i}}if a selector is provided, tooltip objects will be delegated to the specified targets{{/i}}
{{_i}}trigger{{/i}}{{_i}}string{{/i}}'click'{{_i}}how popover is triggered{{/i}} - click | hover | focus | manual
{{_i}}title{{/i}}{{_i}}string | function{{/i}}''{{_i}}default title value if `title` attribute isn't present{{/i}}
{{_i}}content{{/i}}{{_i}}string | function{{/i}}''{{_i}}default content value if `data-content` attribute isn't present{{/i}}
{{_i}}delay{{/i}}{{_i}}number | object{{/i}}0 -

{{_i}}delay showing and hiding the popover (ms) - does not apply to manual trigger type{{/i}}

-

{{_i}}If a number is supplied, delay is applied to both hide/show{{/i}}

-

{{_i}}Object structure is: delay: { show: 500, hide: 100 }{{/i}}

-
{{_i}}animation{{/i}}{{_i}}boolean{{/i}}true{{_i}}apply a css fade transition to the tooltip{{/i}}
{{_i}}html{{/i}}{{_i}}boolean{{/i}}false{{_i}}Insert html into the popover. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.{{/i}}
{{_i}}placement{{/i}}{{_i}}string|function{{/i}}'right'{{_i}}how to position the popover{{/i}} - top | bottom | left | right
{{_i}}selector{{/i}}{{_i}}string{{/i}}false{{_i}}if a selector is provided, tooltip objects will be delegated to the specified targets{{/i}}
{{_i}}trigger{{/i}}{{_i}}string{{/i}}'click'{{_i}}how popover is triggered{{/i}} - click | hover | focus | manual
{{_i}}title{{/i}}{{_i}}string | function{{/i}}''{{_i}}default title value if `title` attribute isn't present{{/i}}
{{_i}}content{{/i}}{{_i}}string | function{{/i}}''{{_i}}default content value if `data-content` attribute isn't present{{/i}}
{{_i}}delay{{/i}}{{_i}}number | object{{/i}}0 +

{{_i}}delay showing and hiding the popover (ms) - does not apply to manual trigger type{{/i}}

+

{{_i}}If a number is supplied, delay is applied to both hide/show{{/i}}

+

{{_i}}Object structure is: delay: { show: 500, hide: 100 }{{/i}}

+
@@ -982,6 +989,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) { ================================================== -->
@@ -1030,189 +1038,191 @@ $('a[data-toggle="tab"]').on('shown', function (e) {

{{_i}}Bootstrap's alert class exposes a few events for hooking into alert functionality.{{/i}}

- - - - + + + + - - - - - - - - + + + + + + + +
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}close{{/i}}{{_i}}This event fires immediately when the close instance method is called.{{/i}}
{{_i}}closed{{/i}}{{_i}}This event is fired when the alert has been closed (will wait for css transitions to complete).{{/i}}
{{_i}}close{{/i}}{{_i}}This event fires immediately when the close instance method is called.{{/i}}
{{_i}}closed{{/i}}{{_i}}This event is fired when the alert has been closed (will wait for css transitions to complete).{{/i}}
-
+        
 $('#my-alert').bind('closed', function () {
   // {{_i}}do something…{{/i}}
 })
-
+
- -
- + +
+ -

{{_i}}Example uses{{/i}}

-

{{_i}}Do more with buttons. Control button states or create groups of buttons for more components like toolbars.{{/i}}

+

{{_i}}Example uses{{/i}}

+

{{_i}}Do more with buttons. Control button states or create groups of buttons for more components like toolbars.{{/i}}

-

{{_i}}Stateful{{/i}}

-

{{_i}}Add data-loading-text="Loading..." to use a loading state on a button.{{/i}}

-
- -
{{! /example }} -
<button type="button" class="btn btn-primary" data-loading-text="Loading...">Loading state</button>
+

{{_i}}Stateful{{/i}}

+

{{_i}}Add data-loading-text="Loading..." to use a loading state on a button.{{/i}}

+
+ +
{{! /example }} +
<button type="button" class="btn btn-primary" data-loading-text="Loading...">Loading state</button>
-

{{_i}}Single toggle{{/i}}

-

{{_i}}Add data-toggle="button" to activate toggling on a single button.{{/i}}

-
- -
{{! /example }} -
<button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button>
+

{{_i}}Single toggle{{/i}}

+

{{_i}}Add data-toggle="button" to activate toggling on a single button.{{/i}}

+
+ +
{{! /example }} +
<button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button>
-

{{_i}}Checkbox{{/i}}

-

{{_i}}Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group.{{/i}}

-
-
- - - -
-
{{! /example }} -
+        

{{_i}}Checkbox{{/i}}

+

{{_i}}Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group.{{/i}}

+
+
+ + + +
+
{{! /example }} +
 <div class="btn-group" data-toggle="buttons-checkbox">
   <button type="button" class="btn btn-primary">Left</button>
   <button type="button" class="btn btn-primary">Middle</button>
   <button type="button" class="btn btn-primary">Right</button>
 </div>
-
+
-

{{_i}}Radio{{/i}}

-

{{_i}}Add data-toggle="buttons-radio" for radio style toggling on btn-group.{{/i}}

-
-
- - - -
-
{{! /example }} -
+        

{{_i}}Radio{{/i}}

+

{{_i}}Add data-toggle="buttons-radio" for radio style toggling on btn-group.{{/i}}

+
+
+ + + +
+
{{! /example }} +
 <div class="btn-group" data-toggle="buttons-radio">
   <button type="button" class="btn btn-primary">Left</button>
   <button type="button" class="btn btn-primary">Middle</button>
   <button type="button" class="btn btn-primary">Right</button>
 </div>
-
+
-
+
-

{{_i}}Usage{{/i}}

-

{{_i}}Enable buttons via JavaScript:{{/i}}

-
$('.nav-tabs').button()
+

{{_i}}Usage{{/i}}

+

{{_i}}Enable buttons via JavaScript:{{/i}}

+
$('.nav-tabs').button()
-

{{_i}}Markup{{/i}}

-

{{_i}}Data attributes are integral to the button plugin. Check out the example code below for the various markup types.{{/i}}

+

{{_i}}Markup{{/i}}

+

{{_i}}Data attributes are integral to the button plugin. Check out the example code below for the various markup types.{{/i}}

-

{{_i}}Options{{/i}}

-

{{_i}}None{{/i}}

+

{{_i}}Options{{/i}}

+

{{_i}}None{{/i}}

-

{{_i}}Methods{{/i}}

-

$().button('toggle')

-

{{_i}}Toggles push state. Gives the button the appearance that it has been activated.{{/i}}

-
- {{_i}}Heads up!{{/i}} - {{_i}}You can enable auto toggling of a button by using the data-toggle attribute.{{/i}} -
-
<button type="button" class="btn" data-toggle="button" >…</button>
-

$().button('loading')

-

{{_i}}Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text.{{/i}} -

-
<button type="button" class="btn" data-loading-text="loading stuff..." >...</button>
-
- {{_i}}Heads up!{{/i}} - {{_i}}Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off".{{/i}} -
-

$().button('reset')

-

{{_i}}Resets button state - swaps text to original text.{{/i}}

-

$().button(string)

-

{{_i}}Resets button state - swaps text to any data defined text state.{{/i}}

-
<button type="button" class="btn" data-complete-text="finished!" >...</button>
+        

{{_i}}Methods{{/i}}

+

$().button('toggle')

+

{{_i}}Toggles push state. Gives the button the appearance that it has been activated.{{/i}}

+
+ {{_i}}Heads up!{{/i}} + {{_i}}You can enable auto toggling of a button by using the data-toggle attribute.{{/i}} +
+
<button type="button" class="btn" data-toggle="button" >…</button>
+

$().button('loading')

+

{{_i}}Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text.{{/i}} +

+
<button type="button" class="btn" data-loading-text="loading stuff..." >...</button>
+
+ {{_i}}Heads up!{{/i}} + {{_i}}Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off".{{/i}} +
+

$().button('reset')

+

{{_i}}Resets button state - swaps text to original text.{{/i}}

+

$().button(string)

+

{{_i}}Resets button state - swaps text to any data defined text state.{{/i}}

+
<button type="button" class="btn" data-complete-text="finished!" >...</button>
 <script>
   $('.btn').button('complete')
 </script>
-
-
+ +
- -
- + +
+ -

{{_i}}About{{/i}}

-

{{_i}}Get base styles and flexible support for collapsible components like accordions and navigation.{{/i}}

-

* {{_i}}Requires the Transitions plugin to be included.{{/i}}

+

{{_i}}About{{/i}}

+

{{_i}}Get base styles and flexible support for collapsible components like accordions and navigation.{{/i}}

+

* {{_i}}Requires the Transitions plugin to be included.{{/i}}

-

{{_i}}Example accordion{{/i}}

-

{{_i}}Using the collapse plugin, we built a simple accordion style widget:{{/i}}

+

{{_i}}Example accordion{{/i}}

+

{{_i}}Using the collapse plugin, we built a simple accordion style widget:{{/i}}

-
-
-
- -
-
- Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
-
-
-
- -
-
- Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
-
-
-
- -
-
- Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
-
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
-
{{! /example }} -
+            
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+
{{! /example }} +
 <div class="accordion" id="accordion2">
   <div class="accordion-group">
     <div class="accordion-heading">
@@ -1240,150 +1250,151 @@ $('#my-alert').bind('closed', function () {
   </div>
 </div>
 ...
-
-

{{_i}}You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.{{/i}}

-
+        
+

{{_i}}You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.{{/i}}

+
 <button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo">
   {{_i}}simple collapsible{{/i}}
 </button>
 
 <div id="demo" class="collapse in"> … </div>
-
+ -
+
-

{{_i}}Usage{{/i}}

+

{{_i}}Usage{{/i}}

-

{{_i}}Via data attributes{{/i}}

-

{{_i}}Just add data-toggle="collapse" and a data-target to element to automatically assign control of a collapsible element. The data-target attribute accepts a css selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.{{/i}}

-

{{_i}}To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action.{{/i}}

+

{{_i}}Via data attributes{{/i}}

+

{{_i}}Just add data-toggle="collapse" and a data-target to element to automatically assign control of a collapsible element. The data-target attribute accepts a css selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.{{/i}}

+

{{_i}}To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action.{{/i}}

-

{{_i}}Via JavaScript{{/i}}

-

{{_i}}Enable manually with:{{/i}}

-
$(".collapse").collapse()
+

{{_i}}Via JavaScript{{/i}}

+

{{_i}}Enable manually with:{{/i}}

+
$(".collapse").collapse()
-

{{_i}}Options{{/i}}

-

{{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-parent="".{{/i}}

- - - - - - - - - - - - - - - - - - - - - - - -
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}parent{{/i}}{{_i}}selector{{/i}}false{{_i}}If selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior){{/i}}
{{_i}}toggle{{/i}}{{_i}}boolean{{/i}}true{{_i}}Toggles the collapsible element on invocation{{/i}}
+

{{_i}}Options{{/i}}

+

{{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-parent="".{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}parent{{/i}}{{_i}}selector{{/i}}false{{_i}}If selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior){{/i}}
{{_i}}toggle{{/i}}{{_i}}boolean{{/i}}true{{_i}}Toggles the collapsible element on invocation{{/i}}
-

{{_i}}Methods{{/i}}

-

.collapse({{_i}}options{{/i}})

-

{{_i}}Activates your content as a collapsible element. Accepts an optional options object.{{/i}} -

+        

{{_i}}Methods{{/i}}

+

.collapse({{_i}}options{{/i}})

+

{{_i}}Activates your content as a collapsible element. Accepts an optional options object.{{/i}} +

 $('#myCollapsible').collapse({
   toggle: false
 })
-
-

.collapse('toggle')

-

{{_i}}Toggles a collapsible element to shown or hidden.{{/i}}

-

.collapse('show')

-

{{_i}}Shows a collapsible element.{{/i}}

-

.collapse('hide')

-

{{_i}}Hides a collapsible element.{{/i}}

+
+

.collapse('toggle')

+

{{_i}}Toggles a collapsible element to shown or hidden.{{/i}}

+

.collapse('show')

+

{{_i}}Shows a collapsible element.{{/i}}

+

.collapse('hide')

+

{{_i}}Hides a collapsible element.{{/i}}

-

{{_i}}Events{{/i}}

-

{{_i}}Bootstrap's collapse class exposes a few events for hooking into collapse functionality.{{/i}}

- - - - - - - - - - - - - - - - - - - - - - - - - -
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}show{{/i}}{{_i}}This event fires immediately when the show instance method is called.{{/i}}
{{_i}}shown{{/i}}{{_i}}This event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).{{/i}}
{{_i}}hide{{/i}} - {{_i}}This event is fired immediately when the hide method has been called.{{/i}} -
{{_i}}hidden{{/i}}{{_i}}This event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).{{/i}}
-
+        

{{_i}}Events{{/i}}

+

{{_i}}Bootstrap's collapse class exposes a few events for hooking into collapse functionality.{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Event{{/i}}{{_i}}Description{{/i}}
{{_i}}show{{/i}}{{_i}}This event fires immediately when the show instance method is called.{{/i}}
{{_i}}shown{{/i}}{{_i}}This event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).{{/i}}
{{_i}}hide{{/i}} + {{_i}}This event is fired immediately when the hide method has been called.{{/i}} +
{{_i}}hidden{{/i}}{{_i}}This event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).{{/i}}
+
 $('#myCollapsible').on('hidden', function () {
   // {{_i}}do something…{{/i}}
 })
-
+
- - - - - -
- + +
+ -
Heads up! This version of typeahead superseeds the original one and supports AJAX and key/value pairs.
+
Heads up! This version of typeahead superseeds the original one and supports AJAX and key/value pairs.
-

{{_i}}Example{{/i}}

-

{{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}

-
- -
{{! /example }} -
<input type="text" data-provide="typeahead">
+

{{_i}}Example{{/i}}

+

{{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}

+
+ +
{{! /example }} +
<input type="text" data-provide="typeahead">
-
- -
{{! /example }} -
+        
+ +
{{! /example }} +
 <select class="span3" data-provide="typeahead" data-items="4">
   <option value="AL">Alabama</option>
   <option value="AK">Alaska</option>
@@ -1637,221 +1650,223 @@ $('.carousel').carousel({
   <option value="CT">Connecticut</option>
   ...
 </select>
-
- -
+
+ +
-

{{_i}}Usage{{/i}}

+

{{_i}}Usage{{/i}}

-

{{_i}}Via data attributes{{/i}}

-

{{_i}}Add data attributes to register an element with typeahead functionality as shown in the example above.{{/i}}

+

{{_i}}Via data attributes{{/i}}

+

{{_i}}Add data attributes to register an element with typeahead functionality as shown in the example above.{{/i}}

-

{{_i}}Via JavaScript{{/i}}

-

{{_i}}Call the typeahead manually with:{{/i}}

-
$('.typeahead').typeahead()
+

{{_i}}Via JavaScript{{/i}}

+

{{_i}}Call the typeahead manually with:{{/i}}

+
$('.typeahead').typeahead()
-

{{_i}}Options{{/i}}

-

{{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-source="".{{/i}}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}source{{/i}}{{_i}}array, object, string, function{{/i}}[ ]{{_i}}The data source to query against. May be an array of strings, an object as key/value pairs, a url (string) or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.{{/i}}
{{_i}}items{{/i}}{{_i}}number{{/i}}8{{_i}}The max number of items to display in the dropdown.{{/i}}
{{_i}}minLength{{/i}}{{_i}}number{{/i}}{{_i}}1{{/i}}{{_i}}The minimum character length needed before triggering autocomplete suggestions{{/i}}
{{_i}}ajaxdelay{{/i}}{{_i}}number{{/i}}{{_i}}400{{/i}}{{_i}}The time between typing and doing an AJAX request. Limiting the number of requests for fast typers.{{/i}}
{{_i}}matcher{{/i}}{{_i}}function{{/i}}{{_i}}case insensitive{{/i}}{{_i}}The method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.{{/i}}
{{_i}}sorter{{/i}}{{_i}}function{{/i}}{{_i}}exact match,
case sensitive,
case insensitive{{/i}}
{{_i}}Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.{{/i}}
{{_i}}updater{{/i}}{{_i}}function{{/i}}{{_i}}returns selected item{{/i}}{{_i}}The method used to return selected item. Accepts a single argument, the item and has the scope of the typeahead instance.{{/i}}
{{_i}}highlighter{{/i}}{{_i}}function{{/i}}{{_i}}highlights all default matches{{/i}}{{_i}}Method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.{{/i}}
+

{{_i}}Options{{/i}}

+

{{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-source="".{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}source{{/i}}{{_i}}array, object, string, function{{/i}}[ ]{{_i}}The data source to query against. May be an array of strings, an object as key/value pairs, a url (string) or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.{{/i}}
{{_i}}items{{/i}}{{_i}}number{{/i}}8{{_i}}The max number of items to display in the dropdown.{{/i}}
{{_i}}minLength{{/i}}{{_i}}number{{/i}}{{_i}}1{{/i}}{{_i}}The minimum character length needed before triggering autocomplete suggestions{{/i}}
{{_i}}ajaxdelay{{/i}}{{_i}}number{{/i}}{{_i}}400{{/i}}{{_i}}The time between typing and doing an AJAX request. Limiting the number of requests for fast typers.{{/i}}
{{_i}}matcher{{/i}}{{_i}}function{{/i}}{{_i}}case insensitive{{/i}}{{_i}}The method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.{{/i}}
{{_i}}sorter{{/i}}{{_i}}function{{/i}}{{_i}}exact match,
case sensitive,
case insensitive{{/i}}
{{_i}}Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.{{/i}}
{{_i}}updater{{/i}}{{_i}}function{{/i}}{{_i}}returns selected item{{/i}}{{_i}}The method used to return selected item. Accepts a single argument, the item and has the scope of the typeahead instance.{{/i}}
{{_i}}highlighter{{/i}}{{_i}}function{{/i}}{{_i}}highlights all default matches{{/i}}{{_i}}Method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.{{/i}}
-

{{_i}}Methods{{/i}}

-

.typeahead({{_i}}options{{/i}})

-

{{_i}}Initializes an input with a typeahead.{{/i}}

- -

{{_i}}Result{{/i}}

-

{{_i}}If the source are key/value pairs, the data-value attribute will contain the key.{{/i}}

-
+

{{_i}}Methods{{/i}}

+

.typeahead({{_i}}options{{/i}})

+

{{_i}}Initializes an input with a typeahead.{{/i}}

+ +

{{_i}}Result{{/i}}

+

{{_i}}If the source are key/value pairs, the data-value attribute will contain the key.{{/i}}

+
- -
- + +
+ -

{{_i}}Example{{/i}}

-

{{_i}}Input masks can be used to force the user to enter data conform a specific format.{{/i}}

-

{{_i}}Unlike validation, the user can't enter any other key than the ones specified by the mask.{{/i}}

-
- -
-
+        

{{_i}}Example{{/i}}

+

{{_i}}Input masks can be used to force the user to enter data conform a specific format.{{/i}}

+

{{_i}}Unlike validation, the user can't enter any other key than the ones specified by the mask.{{/i}}

+
+ +
+
 <input type="text" data-mask="999-99-999-9999-9">
-
+
-
+
-

{{_i}}Usage{{/i}}

+

{{_i}}Usage{{/i}}

-

{{_i}}Via data attributes{{/i}}

-

{{_i}}Add data attributes to register an element with inputmask functionality as shown in the example above.{{/i}}

+

{{_i}}Via data attributes{{/i}}

+

{{_i}}Add data attributes to register an element with inputmask functionality as shown in the example above.{{/i}}

-

{{_i}}Via JavaScript{{/i}}

-

{{_i}}Call the input mask via javascript:{{/i}}

-
$('.inputmask').inputmask()
+

{{_i}}Via JavaScript{{/i}}

+

{{_i}}Call the input mask via javascript:{{/i}}

+
$('.inputmask').inputmask()
-

{{_i}}Options{{/i}}

- - - - - - - - - - - - - - - - - - - - - - - -
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}mask{{/i}}{{_i}}string{{/i}}''{{_i}}A string of formatting and literal characters, defining the input mask (see below).{{/i}}
{{_i}}placeholder{{/i}}{{_i}}string{{/i}}'_'{{_i}}The character that is displayed where something needs to be typed.{{/i}}
+

{{_i}}Options{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}mask{{/i}}{{_i}}string{{/i}}''{{_i}}A string of formatting and literal characters, defining the input mask (see below).{{/i}}
{{_i}}placeholder{{/i}}{{_i}}string{{/i}}'_'{{_i}}The character that is displayed where something needs to be typed.{{/i}}
-

{{_i}}Format{{/i}}

- - - - - - - - - - -
{{_i}}Character{{/i}}{{_i}}Description{{/i}}
9{{_i}}Number{{/i}}
a{{_i}}Letter{{/i}}
?{{_i}}Alphanumeric{{/i}}
*{{_i}}Any character{{/i}}
+

{{_i}}Format{{/i}}

+ + + + + + + + + + +
{{_i}}Character{{/i}}{{_i}}Description{{/i}}
9{{_i}}Number{{/i}}
a{{_i}}Letter{{/i}}
?{{_i}}Alphanumeric{{/i}}
*{{_i}}Any character{{/i}}
-

{{_i}}Methods{{/i}}

-

.inputmask({{_i}}options{{/i}})

-

{{_i}}Initializes an input with an input mask.{{/i}}

-
+

{{_i}}Methods{{/i}}

+

.inputmask({{_i}}options{{/i}})

+

{{_i}}Initializes an input with an input mask.{{/i}}

+
- -
-
- -
- + +
+ -

{{_i}}Example{{/i}}

-

{{_i}}The subnavigation on the left is a live demo of the affix plugin.{{/i}}

+

{{_i}}Example{{/i}}

+

{{_i}}The subnavigation on the left is a live demo of the affix plugin.{{/i}}

-
+
-

{{_i}}Usage{{/i}}

+

{{_i}}Usage{{/i}}

-

{{_i}}Via data attributes{{/i}}

-

{{_i}}To easily add affix behavior to any element, just add data-spy="affix" to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.{{/i}}

+

{{_i}}Via data attributes{{/i}}

+

{{_i}}To easily add affix behavior to any element, just add data-spy="affix" to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.{{/i}}

-
<div data-spy="affix" data-offset-top="200">...</div>
+
<div data-spy="affix" data-offset-top="200">...</div>
-
- {{_i}}Heads up!{{/i}} - {{_i}}You must manage the position of a pinned element and the behavior of its immediate parent. Position is controlled by affix, affix-top, and affix-bottom. Remember to check for a potentially collapsed parent when the affix kicks in as it's removing content from the normal flow of the page.{{/i}} -
+
+ {{_i}}Heads up!{{/i}} + {{_i}}You must manage the position of a pinned element and the behavior of its immediate parent. Position is controlled by affix, affix-top, and affix-bottom. Remember to check for a potentially collapsed parent when the affix kicks in as it's removing content from the normal flow of the page.{{/i}} +
-

{{_i}}Via JavaScript{{/i}}

-

{{_i}}Call the affix plugin via JavaScript:{{/i}}

-
$('#navbar').affix()
+

{{_i}}Via JavaScript{{/i}}

+

{{_i}}Call the affix plugin via JavaScript:{{/i}}

+
$('#navbar').affix()
-

{{_i}}Methods{{/i}}

-

.affix('refresh')

-

{{_i}}When using affix in conjunction with adding or removing of elements from the DOM, you'll want to call the refresh method:{{/i}}

-
+        

{{_i}}Methods{{/i}}

+

.affix('refresh')

+

{{_i}}When using affix in conjunction with adding or removing of elements from the DOM, you'll want to call the refresh method:{{/i}}

+
 $('[data-spy="affix"]').each(function () {
   $(this).affix('refresh')
 });
-
-

{{_i}}Options{{/i}}

-

{{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset-top="200".{{/i}}

- - - - - - - - - - - - - - - - - -
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}offset{{/i}}{{_i}}number | function | object{{/i}}{{_i}}10{{/i}}{{_i}}Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and left directions. To listen for a single direction, or multiple unique offsets, just provide an object offset: { x: 10 }. Use a function when you need to dynamically provide an offset (useful for some responsive designs).{{/i}}
-
+ +

{{_i}}Options{{/i}}

+

{{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset-top="200".{{/i}}

+ + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}offset{{/i}}{{_i}}number | function | object{{/i}}{{_i}}10{{/i}}{{_i}}Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and left directions. To listen for a single direction, or multiple unique offsets, just provide an object offset: { x: 10 }. Use a function when you need to dynamically provide an offset (useful for some responsive designs).{{/i}}
+
-
{{! /span9 }} -
{{! row}} +
{{! /span9 }} +
{{! row}} -
{{! /.container }} +
{{! /.container }}