From 0dda2c4659c6e0407b5b9fda6618ab5c8c12a897 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 23 Jul 2012 22:36:08 -0700 Subject: make docs scroll over jumbotrons, but only for 980px up --- docs/javascript.html | 2400 +++++++++++++++++++++++++------------------------- 1 file changed, 1198 insertions(+), 1202 deletions(-) (limited to 'docs/javascript.html') diff --git a/docs/javascript.html b/docs/javascript.html index 70355957c..2e51ba527 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -78,104 +78,105 @@ -
- - - -
- -
+
+
+ +
+ +
- -
- -

Individual or compiled

-

If you have downloaded the latest version of Bootstrap, both bootstrap.js and bootstrap.min.js contain all of these plugins.

-

Data attributes

-

...

+ +
+ -

Programmatic API

-

...

+

Individual or compiled

+

If you have downloaded the latest version of Bootstrap, both bootstrap.js and bootstrap.min.js contain all of these plugins.

+

Data attributes

+

...

+

Programmatic API

+

...

-
+
- -
- -

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.

+ +
+ -

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.

-
-
- - - - -
- +

Options

+

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

+ + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
offsetnumber10Pixels 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 transiton 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
@@ -666,8 +666,8 @@ $('#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>
@@ -676,11 +676,11 @@ $('#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>
@@ -703,429 +703,425 @@ $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
 </script>
 
-

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.
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.
+

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.
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.
 $('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)
- -

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
htmlbooleantrueInsert 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 - 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. -
+
+ + +

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
htmlbooleantrueInsert 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 - 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. +
-

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.

+

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')

-

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')

+

Destroys an element's tooltip.

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

Examples

-

Add small overlays of content, like those on the iPad, to any element for housing secondary information. Hover over the button to trigger the popover. Requires Tooltip to be included.

- -

Static popover

-

Four options are available: top, right, bottom, and left aligned.

-
-
-
-

Popover top

-
-

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+

Examples

+

Add small overlays of content, like those on the iPad, to any element for housing secondary information. Hover over the button to trigger the popover. Requires Tooltip to be included.

+ +

Static popover

+

Four options are available: top, right, bottom, and left aligned.

+
+
+
+

Popover top

+
+

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+
-
-
-
-

Popover right

-
-

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+
+
+

Popover right

+
+

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+
-
-
-
-

Popover bottom

-
-

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+
+
+

Popover bottom

+
+

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+
-
-
-
-

Popover left

-
-

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+
+
+

Popover left

+
+

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+
-
-
-
-

No markup shown as popovers are generated from javascript and content within a data attribute.

+
+
+

No markup shown as popovers are generated from javascript and content within a data attribute.

-

Live demo

- +

Live demo

+ -
- - -

Usage

-

Enable popovers via javascript:

-
$('#example').popover(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
htmlbooleantrueInsert 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'hover'how popover is triggered - 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 }

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

Usage

+

Enable popovers via javascript:

+
$('#example').popover(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
htmlbooleantrueInsert 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'hover'how popover is triggered - 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 }

+
+
+ Heads up! + Options for individual popovers 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.

- -

Methods

-

$().popover(options)

-

Initializes popovers for an element collection.

-

.popover('show')

-

Reveals an elements popover.

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

.popover('hide')

-

Hides an elements popover.

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

.popover('toggle')

-

Toggles an elements popover.

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

.popover('destroy')

-

Destroys an element's popover.

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

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.

+ +

Methods

+

$().popover(options)

+

Initializes popovers for an element collection.

+

.popover('show')

+

Reveals an elements popover.

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

.popover('hide')

+

Hides an elements popover.

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

.popover('toggle')

+

Toggles an elements popover.

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

.popover('destroy')

+

Destroys an element's popover.

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

Example alerts

-

Add dismiss functionality to all alerge messages with this plugin.

-
-
- - Holy guacamole! Best check yo self, you're not looking too good. +

Example alerts

+

Add dismiss functionality to all alerge messages with this plugin.

+
+
+ + Holy guacamole! Best check yo self, you're not looking too good. +
-
-
-
- -

Oh snap! You got an error!

-

Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

-

- Take this action Or do this -

+
+
+ +

Oh snap! You got an error!

+

Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

+

+ Take this action Or do this +

+
-
-
- - -

Usage

-

Enable dismissal of an alert via javascript:

-
$(".alert").alert()
- -

Markup

-

Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.

-
<a class="close" data-dismiss="alert" href="#">&times;</a>
- -

Methods

-

$().alert()

-

Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.

-

.alert('close')

-

Closes an alert.

-
$(".alert").alert('close')
- - -

Events

-

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

- - - - - - - - - - - - - - - - - -
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).
+
+ + +

Usage

+

Enable dismissal of an alert via javascript:

+
$(".alert").alert()
+ +

Markup

+

Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.

+
<a class="close" data-dismiss="alert" href="#">&times;</a>
+ +

Methods

+

$().alert()

+

Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.

+

.alert('close')

+

Closes an alert.

+
$(".alert").alert('close')
+ + +

Events

+

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

+ + + + + + + + + + + + + + + + + +
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).
 $('#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.

+ +
+ -

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>
-
+

Example uses

+

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

-

Single toggle

-

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

-
- -
-
-<button type="button" class="btn" data-toggle="button">Single Toggle</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>
-

Checkbox

-

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

-
-
- - - +

Single toggle

+

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

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

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">Left</button>
@@ -1134,15 +1130,15 @@ $('#my-alert').bind('closed', function () {
 </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">Left</button>
@@ -1152,101 +1148,102 @@ $('#my-alert').bind('closed', function () {
 
-
+
-

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.

+

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>
-
+</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. +
-
-
-
- - Collapsible Group Item #3 - +
+ +
+
+ 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. +
-
 <button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo">
   simple collapsible
@@ -1256,137 +1253,138 @@ $('#my-alert').bind('closed', function () {
 
-
- - -

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 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
- - -

Methods

-

.collapse(options)

-

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


+ + +

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 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
+ + +

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.

- -

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).
+}) + +

.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).
 $('#myCollapsible').on('hidden', function () {
   // do something…
 })
-
+
- -
+
...
+ +
+
-- cgit v1.2.3