diff --git a/docs/_includes/docs-nav.html b/docs/_includes/docs-nav.html index 78a26ffb23..f43b568121 100644 --- a/docs/_includes/docs-nav.html +++ b/docs/_includes/docs-nav.html @@ -79,20 +79,63 @@
<section>
should be wrapped as inline.
- Dozens of reusable components built to provide iconography, dropdowns, navigation, alerts, popovers, and much more.
-Dozens of reusable components built to provide iconography, dropdowns, navigation, alerts, popovers, and much more.
+Bootstrap comes with all 160 of Glyphicons Halflings set, all available in font formats for easy coloring, sizing, and placement.
+Bootstrap comes with all 160 of Glyphicons Halflings set, all available in font formats for easy coloring, sizing, and placement.
-Glyphicons Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creator have made this possible at no cost to you as developers. As a thank you, we ask you to include an optional link back to Glyphicons whenever practical.
+Glyphicons Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creator have made this possible at no cost to you as developers. As a thank you, we ask you to include an optional link back to Glyphicons whenever practical.
-Add the appropriate class to any inline element. All icon classes are prefixed with glyphicon-
for easy styling. To use, place the following code just about anywhere:
Add the appropriate class to any inline element. All icon classes are prefixed with glyphicon-
for easy styling. To use, place the following code just about anywhere:
Want to change the icon color? Just change the color
of the parent element.
When using beside strings of text, as in buttons or nav links, be sure to leave a space after the icon for proper spacing.
+Want to change the icon color? Just change the color
of the parent element.
When using beside strings of text, as in buttons or nav links, be sure to leave a space after the icon for proper spacing.
-Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.
+Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.
-<section>
should be wrapped as inline.
<section>
should be wrapped as inline.
<section>
should be wrapped as inline.
<section>
should be wrapped as inline.
Toggleable, contextual menu for displaying lists of links. Made interactive with the dropdown JavaScript plugin.
- -Toggleable, contextual menu for displaying lists of links. Made interactive with the dropdown JavaScript plugin.
- -Wrap the dropdown's trigger and the dropdown menu within .dropdown
, or another element that declares position: relative;
. Then add the menu's HTML.
Wrap the dropdown's trigger and the dropdown menu within .dropdown
, or another element that declares position: relative;
. Then add the menu's HTML.
<section>
should be wrapped as inline.
Add .pull-right
to a .dropdown-menu
to right align the dropdown menu.
Add .pull-right
to a .dropdown-menu
to right align the dropdown menu.
Add .disabled
to a <li>
in the dropdown to disable the link.
Add .disabled
to a <li>
in the dropdown to disable the link.
<section>
should be wrapped as inline.
Add an extra level of dropdown menus, appearing on hover like those of OS X, with some simple markup additions. Add .dropdown-submenu
to any li
in an existing dropdown menu for automatic styling.
Add an extra level of dropdown menus, appearing on hover like those of OS X, with some simple markup additions. Add .dropdown-submenu
to any li
in an existing dropdown menu for automatic styling.
Default
-Default
+Dropup
-Dropup
+Left submenu
-Left submenu
+<section>
should be wrapped as inline.
Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with our buttons plugin.
- -Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with our buttons plugin.
- -Wrap a series of buttons with .btn
in .btn-group
.
Wrap a series of buttons with .btn
in .btn-group
.
<section>
should be wrapped as inline.
Combine sets of <div class="btn-group">
into a <div class="btn-toolbar">
for more complex components.
Combine sets of <div class="btn-group">
into a <div class="btn-toolbar">
for more complex components.
<section>
should be wrapped as inline.
Make a set of buttons appear vertically stacked rather than horizontally.
-Make a set of buttons appear vertically stacked rather than horizontally.
+Make a group of buttons stretch at the same size to span the entire width of its parent. This only works with <a>
elements as the <button>
doesn't pick up these styles.
Make a group of buttons stretch at the same size to span the entire width of its parent. This only works with <a>
elements as the <button>
doesn't pick up these styles.
Use any button to trigger a dropdown menu by placing it within a .btn-group
and providing the proper menu markup. Requires the Bootstrap dropdown plugin.
Use any button to trigger a dropdown menu by placing it within a .btn-group
and providing the proper menu markup. Requires the Bootstrap dropdown plugin.
Turn a button into dropdown toggle, or add a second button to toggle the dropdown while retaining the primary button action.
-Turn a button into dropdown toggle, or add a second button to toggle the dropdown while retaining the primary button action.
+<section>
should be wrapped as inline.
Button dropdowns work at any size: .btn-large
, .btn-small
, or .btn-mini
.
Button dropdowns work at any size: .btn-large
, .btn-small
, or .btn-mini
.
<section>
should be wrapped as inline.
Trigger dropdown menus above elements by adding .dropup
to the parent.
Trigger dropdown menus above elements by adding .dropup
to the parent.
<section>
should be wrapped as inline.
Navs available in Bootstrap have shared markup, starting with the base .nav
class, as well as shared states. Swap modifier classes to switch between each style.
Navs available in Bootstrap have shared markup, starting with the base .nav
class, as well as shared states. Swap modifier classes to switch between each style.
Note the .nav-tabs
class requires the .nav
base class.
Note the .nav-tabs
class requires the .nav
base class.
<section>
should be wrapped as inline.
Swap the tabs class for .nav-list
.
Swap the tabs class for .nav-list
.
<section>
should be wrapped as inline.
Take that same HTML, but use .nav-pills
instead:
Take that same HTML, but use .nav-pills
instead:
Pills are also vertically stackable. Just add .nav-stacked
.
Pills are also vertically stackable. Just add .nav-stacked
.
Easily make tabs or pills equal widths of their parent with .nav-justified
.
Easily make tabs or pills equal widths of their parent with .nav-justified
.
<section>
should be wrapped as inline.
For any nav component (tabs, pills, or list), add .disabled
for gray links and no hover effects. Links will remain clickable, however, unless you remove the href
attribute. Alternatively, you could implement custom JavaScript to prevent those clicks.
For any nav component (tabs, pills, or list), add .disabled
for gray links and no hover effects. Links will remain clickable, however, unless you remove the href
attribute. Alternatively, you could implement custom JavaScript to prevent those clicks.
<section>
should be wrapped as inline.
{% endhighlight %}
- To align nav links, use the .pull-left
or .pull-right
utility classes. Both classes will add a CSS float in the specified direction.
To align nav links, use the .pull-left
or .pull-right
utility classes. Both classes will add a CSS float in the specified direction.
Add dropdown menus with a little extra HTML and the dropdowns JavaScript plugin.
+Add dropdown menus with a little extra HTML and the dropdowns JavaScript plugin.
-<section>
should be wrapped as inline.
<section>
should be wrapped as inline.
To start, navbars are static (not fixed to the top) and include support for a project name and basic navigation. Place one anywhere within a .container
, which sets the width of your site and content.
To start, navbars are static (not fixed to the top) and include support for a project name and basic navigation. Place one anywhere within a .container
, which sets the width of your site and content.
<section>
should be wrapped as inline.
A simple link to show your brand or project name only requires an anchor tag.
-A simple link to show your brand or project name only requires an anchor tag.
+Nav items are simple to add via unordered lists.
- +Nav items are simple to add via unordered lists.
+ {% highlight html linenos %} {% endhighlight %} -You can easily add dividers to your nav links with an empty list item and a simple class. Just add the appropriate class to <li>
elements between links. Dividers will be horizontal to start, but at resolutions above 768px they become vertical with the navigation.
You can easily add dividers to your nav links with an empty list item and a simple class. Just add the appropriate class to <li>
elements between links. Dividers will be horizontal to start, but at resolutions above 768px they become vertical with the navigation.
<section>
should be wrapped as inline.
To properly style and position a form within the navbar, add the appropriate classes as shown below. For a default form, include .navbar-form
and either .pull-left
or .pull-right
to properly align it.
To properly style and position a form within the navbar, add the appropriate classes as shown below. For a default form, include .navbar-form
and either .pull-left
or .pull-right
to properly align it.
Align nav links, search form, or text, use the .pull-left
or .pull-right
utility classes. Both classes will add a CSS float in the specified direction.
Align nav links, search form, or text, use the .pull-left
or .pull-right
utility classes. Both classes will add a CSS float in the specified direction.
Add dropdowns and dropups to the nav with a bit of markup and the dropdowns JavaScript plugin.
+Add dropdowns and dropups to the nav with a bit of markup and the dropdowns JavaScript plugin.
-Wrap strings of text in an element with .navbar-text
, usually on a <p>
tag for proper leading and color.
Wrap strings of text in an element with .navbar-text
, usually on a <p>
tag for proper leading and color.
Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, .navbar
.
Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, .navbar
.
Add .navbar-fixed-top
and remember to account for the hidden area underneath it by adding at least 40px padding
to the <body>
. Be sure to add this after the core Bootstrap CSS and before the optional responsive CSS.
Add .navbar-fixed-top
and remember to account for the hidden area underneath it by adding at least 40px padding
to the <body>
. Be sure to add this after the core Bootstrap CSS and before the optional responsive CSS.
Add .navbar-fixed-bottom
instead.
Add .navbar-fixed-bottom
instead.
Create a full-width navbar that scrolls away with the page by adding .navbar-static-top
. Unlike the .navbar-fixed-top
class, you do not need to change any padding on the body
.
Create a full-width navbar that scrolls away with the page by adding .navbar-static-top
. Unlike the .navbar-fixed-top
class, you do not need to change any padding on the body
.
<section>
should be wrapped as inline.
{% endhighlight %}
- To implement a collapsing responsive navbar, wrap your navbar content in a containing div, .nav-collapse.collapse
, and add the navbar toggle button, .navbar-toggle
.
To implement a collapsing responsive navbar, wrap your navbar content in a containing div, .nav-collapse.collapse
, and add the navbar toggle button, .navbar-toggle
.
<section>
should be wrapped as inline.
Modify the look of the navbar by adding .navbar-inverse
.
Modify the look of the navbar by adding .navbar-inverse
.
Indicate the current page's location within a navigational hierarchy.
+ +Indicate the current page's location within a navigational hierarchy.
- + {% highlight html linenos %}<section>
should be wrapped as inline.
Provide pagination links for your site or app with the multi-page pagination component, or the simpler pager alternative.
+ +Provide pagination links for your site or app with the multi-page pagination component, or the simpler pager alternative.
-Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.
- +Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.
+ {% highlight html linenos %}<section>
should be wrapped as inline.
Links are customizable for different circumstances. Use .disabled
for unclickable links and .active
to indicate the current page.
Links are customizable for different circumstances. Use .disabled
for unclickable links and .active
to indicate the current page.
<section>
should be wrapped as inline.
...
You can optionally swap out active or disabled anchors for <span>
to remove click functionality while retaining intended styles.
You can optionally swap out active or disabled anchors for <span>
to remove click functionality while retaining intended styles.
<section>
should be wrapped as inline.
{% endhighlight %}
- Fancy larger or smaller pagination? Add .pagination-large
, .pagination-small
, or .pagination-mini
for additional sizes.
Fancy larger or smaller pagination? Add .pagination-large
, .pagination-small
, or .pagination-mini
for additional sizes.
<section>
should be wrapped as inline.
{% endhighlight %}
- Quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines.
+Quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines.
-By default, the pager centers links.
- +By default, the pager centers links.
+ {% highlight html linenos %}<section>
should be wrapped as inline.
Alternatively, you can align each link to the sides:
- +Alternatively, you can align each link to the sides:
+ {% highlight html linenos %}<section>
should be wrapped as inline.
{% endhighlight %}
- Pager links also use the general .disabled
utility class from the pagination.
Pager links also use the general .disabled
utility class from the pagination.
Add any of the below mentioned modifier classes to change the appearance of a label.
-Labels | -Markup | -
---|---|
- Default - | -
- <span class="label">Default</span>
- |
-
- Success - | -
- <span class="label label-success">Success</span>
- |
-
- Warning - | -
- <span class="label label-warning">Warning</span>
- |
-
- Danger - | -
- <span class="label label-danger">Danger</span>
- |
-
- Info - | -
- <span class="label label-info">Info</span>
- |
-
Add any of the below mentioned modifier classes to change the appearance of a label.
+Labels | +Markup | +
---|---|
+ Default + | +
+ <span class="label">Default</span>
+ |
+
+ Success + | +
+ <span class="label label-success">Success</span>
+ |
+
+ Warning + | +
+ <span class="label label-warning">Warning</span>
+ |
+
+ Danger + | +
+ <span class="label label-danger">Danger</span>
+ |
+
+ Info + | +
+ <span class="label label-info">Info</span>
+ |
+
Easily highlight new or unread items by adding a <span class="badge">
to links, Bootstrap navs, and more.
Easily highlight new or unread items by adding a <span class="badge">
to links, Bootstrap navs, and more.
When there are no new or unread items, badges will simply collapse (via CSS's :empty
selector) provided no content exists within.
When there are no new or unread items, badges will simply collapse (via CSS's :empty
selector) provided no content exists within.
Built-in styles are included for placing badges in active states in pill and list navigations.
- +Built-in styles are included for placing badges in active states in pill and list navigations.
+ {% highlight html linenos %}<section>
should be wrapped as inline.
...
A lightweight, flexible component to showcase key content on your site. It works well on marketing and content-heavy sites.
-This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.
- -A lightweight, flexible component to showcase key content on your site. It works well on marketing and content-heavy sites.
+This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.
+ +<section>
should be wrapped as inline.
A simple shell for an h1
to appropriately space out and segment sections of content on a page. It can utilize the h1
's default small
, element as well most other components (with additional styles).
A simple shell for an h1
to appropriately space out and segment sections of content on a page. It can utilize the h1
's default small
, element as well most other components (with additional styles).
Extend Bootstrap's grid system with the thumbnail component to easily display grids of images, videos, text, and more.
+ +Extend Bootstrap's grid system with the thumbnail component to easily display grids of images, videos, text, and more.
-By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.
- +By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.
+ {% highlight html linenos %}<section>
should be wrapped as inline.
With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.
-With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.
+<section>
should be wrapped as inline.
Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the alerts jQuery plugin.
+ +Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the alerts jQuery plugin.
-Wrap any text and an optional dismiss button in .alert
for a basic warning alert message. To ensure proper behavior across all devices, be sure to use <button>
element with the data-dismiss="alert"
data attribute.
Wrap any text and an optional dismiss button in .alert
for a basic warning alert message. To ensure proper behavior across all devices, be sure to use <button>
element with the data-dismiss="alert"
data attribute.
<section>
should be wrapped as inline.
For longer messages, increase the padding on the top and bottom of the alert wrapper by adding .alert-block
.
Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
-For longer messages, increase the padding on the top and bottom of the alert wrapper by adding .alert-block
.
Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
+<section>
should be wrapped as inline.
Add optional classes to change an alert's connotation.
-Add optional classes to change an alert's connotation.
+Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.
+ +Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.
-Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in IE8-9 or older versions of Firefox. Internet Explorer 10 and below, as well as Opera 12, do not support animations.
+Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in IE8-9 or older versions of Firefox. Internet Explorer 10 and below, as well as Opera 12, do not support animations.
-Default progress bar with a vertical gradient.
-Default progress bar with a vertical gradient.
+Progress bars use some of the same button and alert classes for consistent styles.
-Progress bars use some of the same button and alert classes for consistent styles.
+<section>
should be wrapped as inline.
Uses a gradient to create a striped effect. Not available in IE8.
-Uses a gradient to create a striped effect. Not available in IE8.
+<section>
should be wrapped as inline.
Add .active
to .progress-striped
to animate the stripes right to left. Not available in all versions of IE.
Add .active
to .progress-striped
to animate the stripes right to left. Not available in all versions of IE.
Place multiple bars into the same .progress
to stack them.
Place multiple bars into the same .progress
to stack them.
<section>
should be wrapped as inline.
Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.
+ +The default media allow to float a media object (images, video, audio) to the left or right of a content block.
+Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.
- -The default media allow to float a media object (images, video, audio) to the left or right of a content block.
-With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).
-Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
- -With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).
+Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
+ +<section>
should be wrapped as inline.
Use the well as a simple effect on an element to give it an inset effect.
-Use the well as a simple effect on an element to give it an inset effect.
+Control padding and rounded corners with two optional modifier classes.
-Control padding and rounded corners with two optional modifier classes.
+Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one.
+Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one.
+Plugins can be included individually (though some have required dependencies), or all at once. Do attempt to include both. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file.
- -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.
-Plugins can be included individually (though some have required dependencies), or all at once. Do attempt to include both. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file.
- -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: +
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: {% highlight js linenos %} $('body').off('.data-api') {% endhighlight %} -
Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:
+Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:
{% highlight js linenos %} $('body').off('.alert.data-api') {% endhighlight %} -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.
+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.
{% highlight js linenos %} $(".btn.danger").button("toggle").addClass("fat") {% endhighlight %} -All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):
+All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):
{% highlight js linenos %} $("#myModal").modal() // initialized with defaults $("#myModal").modal({ keyboard: false }) // initialized with no keyboard $("#myModal").modal('show') // initializes and invokes show immediately {% endhighlight %} -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')
.
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.
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.
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.
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.
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.
-A few examples of the transition plugin:
-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.
+A few examples of the transition plugin:
+Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.
-Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.
- -A rendered modal with header, body, and set of actions in the footer.
-A rendered modal with header, body, and set of actions in the footer.
+Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.
- -Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.
+ +Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
+Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
-This button should trigger a popover on click.
+This button should trigger a popover on click.
-This link and that link should have tooltips on hover.
+This link and that link should have tooltips on hover.
-Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
-Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.
-Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.
-Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
-Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.
-Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.
-Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
+Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.
+Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.
+Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
+Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.
+Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.
+Activate a modal without writing JavaScript. Set data-toggle="modal"
on a controller element, like a button, along with a data-target="#foo"
or href="#foo"
to target a specific modal to toggle.
Activate a modal without writing JavaScript. Set data-toggle="modal"
on a controller element, like a button, along with a data-target="#foo"
or href="#foo"
to target a specific modal to toggle.
Call a modal with id myModal
with a single line of JavaScript:
Call a modal with id myModal
with a single line of JavaScript:
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-backdrop=""
.
Name | -type | -default | -description | -||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
backdrop | -boolean | -true | -Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click. |
- ||||||||||||||||||||
keyboard | -boolean | -true | -Closes the modal when escape key is pressed | -||||||||||||||||||||
show | -boolean | -true | -Shows the modal when initialized. | -||||||||||||||||||||
remote | -path | -false | -If a remote url is provided, content will be loaded via jQuery's Options+Options can be passed via data attributes or JavaScript. For data attributes, append the option name to
|
Activates your content as a modal. Accepts an optional options object
.
Activates your content as a modal. Accepts an optional options object
.
Manually toggles a modal.
- {% highlight js linenos %}$('#myModal').modal('toggle'){% endhighlight %} +Manually toggles a modal.
+ {% highlight js linenos %}$('#myModal').modal('toggle'){% endhighlight %} -Manually opens a modal.
- {% highlight js linenos %}$('#myModal').modal('show'){% endhighlight %} +Manually opens a modal.
+ {% highlight js linenos %}$('#myModal').modal('show'){% endhighlight %} -Manually hides a modal.
- {% highlight js linenos %}$('#myModal').modal('hide'){% endhighlight %} +Manually hides a modal.
+ {% highlight js linenos %}$('#myModal').modal('hide'){% endhighlight %} -Bootstrap's modal class exposes a few events for hooking into modal functionality.
-Event | -Description | -
---|---|
show | -This event fires immediately when the show instance method is called. |
-
shown | -This event is fired when the modal has been made visible to the user (will wait for css transitions to complete). | -
hide | -This event is fired immediately when the hide instance method has been called. |
-
hidden | -This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete). | -
Bootstrap's modal class exposes a few events for hooking into modal functionality.
+Event | +Description | +
---|---|
show | +This event fires immediately when the show instance method is called. |
+
shown | +This event is fired when the modal has been made visible to the user (will wait for css transitions to complete). | +
hide | +This event is fired immediately when the hide instance method has been called. |
+
hidden | +This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete). | +