<iframeclass="github-btn"src="http://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=watch&count=true"width="100"height="20"title="Star on GitHub"></iframe>
<iframeclass="github-btn"src="http://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=watch&count=true"width="100"height="20"title="Star on GitHub"></iframe>
@@ -9,19 +9,19 @@ Have a need for Bootstrap's brand resources? Great! We have only a few guideline
...
@@ -9,19 +9,19 @@ Have a need for Bootstrap's brand resources? Great! We have only a few guideline
Use either the Bootstrap mark (a capital **B**) or the standard logo (just **Bootstrap**). It should always appear in Helvetica Neue Bold. **Do not use the Twitter bird** in association with Bootstrap.
Use either the Bootstrap mark (a capital **B**) or the standard logo (just **Bootstrap**). It should always appear in Helvetica Neue Bold. **Do not use the Twitter bird** in association with Bootstrap.
@@ -46,16 +46,16 @@ Download the Bootstrap mark in one of three styles, each available as an SVG fil
...
@@ -46,16 +46,16 @@ Download the Bootstrap mark in one of three styles, each available as an SVG fil
The project and framework should always be referred to as **Bootstrap**. No Twitter before it, no capital _s_, and no abbreviations except for one, a capital **B**.
The project and framework should always be referred to as **Bootstrap**. No Twitter before it, no capital _s_, and no abbreviations except for one, a capital **B**.
<divclass="bs-brand-logos">
<divclass="bd-brand-logos">
<divclass="bs-brand-item">
<divclass="bd-brand-item">
<h3>Bootstrap</h3>
<h3>Bootstrap</h3>
<strongclass="text-success">Right</strong>
<strongclass="text-success">Right</strong>
</div>
</div>
<divclass="bs-brand-item">
<divclass="bd-brand-item">
<h3class="text-muted">BootStrap</h3>
<h3class="text-muted">BootStrap</h3>
<strongclass="text-warning">Wrong</strong>
<strongclass="text-warning">Wrong</strong>
</div>
</div>
<divclass="bs-brand-item">
<divclass="bd-brand-item">
<h3class="text-muted">Twitter Bootstrap</h3>
<h3class="text-muted">Twitter Bootstrap</h3>
<strongclass="text-warning">Wrong</strong>
<strongclass="text-warning">Wrong</strong>
</div>
</div>
...
@@ -65,11 +65,11 @@ The project and framework should always be referred to as **Bootstrap**. No Twit
...
@@ -65,11 +65,11 @@ The project and framework should always be referred to as **Bootstrap**. No Twit
Our docs and branding use a handful of primary colors to differentiate what *is* Bootstrap from what *is in* Bootstrap. In other words, if it's purple, it's representative of Bootstrap.
Our docs and branding use a handful of primary colors to differentiate what *is* Bootstrap from what *is in* Bootstrap. In other words, if it's purple, it's representative of Bootstrap.
Bootstrap is maintained by the founding team and a small group of invaluable core contributors, with the massive support and involvement of our community.
Bootstrap is maintained by the founding team and a small group of invaluable core contributors, with the massive support and involvement of our community.
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
*/
!function(a){"use strict";a(function(){a(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"}),a(".popover-demo").popover({selector:'[data-toggle="popover"]',container:"body"}),a(".tooltip-test").tooltip(),a(".popover-test").popover(),a(".bs-docs-popover").popover(),a("#loading-example-btn").on("click",function(){varb=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)}),a("#exampleModal").on("show.bs.modal",function(b){varc=a(b.relatedTarget),d=c.data("whatever"),e=a(this);e.find(".modal-title").text("New message to "+d),e.find(".modal-body input").val(d)}),a(".bs-docs-activate-animated-progressbar").on("click",function(){a(this).prev(".progress-striped").toggleClass("progress-animated")}),ZeroClipboard.config({moviePath:"/assets/flash/ZeroClipboard.swf",hoverClass:"btn-clipboard-hover"}),a(".highlight").each(function(){varb='<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>';a(this).before(b)});varb=newZeroClipboard(a(".btn-clipboard")),c=a("#global-zeroclipboard-html-bridge");b.on("load",function(){c.data("placement","top").attr("title","Copy to clipboard").tooltip()}),b.on("dataRequested",function(b){varc=a(this).parent().nextAll(".highlight").first();b.setText(c.text())}),b.on("complete",function(){c.attr("title","Copied!").tooltip("fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("fixTitle")}),b.on("noflash wrongflash",function(){c.attr("title","Flash required").tooltip("fixTitle").tooltip("show")})})}(jQuery);
!function(a){"use strict";a(function(){a(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"}),a(".popover-demo").popover({selector:'[data-toggle="popover"]',container:"body"}),a(".tooltip-test").tooltip(),a(".popover-test").popover(),a(".bd-popover").popover(),a("#loading-example-btn").on("click",function(){varb=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)}),a("#exampleModal").on("show.bs.modal",function(b){varc=a(b.relatedTarget),d=c.data("whatever"),e=a(this);e.find(".modal-title").text("New message to "+d),e.find(".modal-body input").val(d)}),a(".bd-activate-animated-progressbar").on("click",function(){a(this).prev(".progress-striped").toggleClass("progress-animated")}),ZeroClipboard.config({moviePath:"/assets/flash/ZeroClipboard.swf",hoverClass:"btn-clipboard-hover"}),a(".highlight").each(function(){varb='<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>';a(this).before(b)});varb=newZeroClipboard(a(".btn-clipboard")),c=a("#global-zeroclipboard-html-bridge");b.on("load",function(){c.data("placement","top").attr("title","Copy to clipboard").tooltip()}),b.on("dataRequested",function(b){varc=a(this).parent().nextAll(".highlight").first();b.setText(c.text())}),b.on("complete",function(){c.attr("title","Copied!").tooltip("fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("fixTitle")}),b.on("noflash wrongflash",function(){c.attr("title","Flash required").tooltip("fixTitle").tooltip("show")})})}(jQuery);
@@ -8,7 +8,7 @@ Bootstrap currently works around several outstanding browser bugs in major brows
...
@@ -8,7 +8,7 @@ Bootstrap currently works around several outstanding browser bugs in major brows
We publicly list browser bugs that are impacting us here, in the hopes of expediting the process of fixing them. For information on Bootstrap's browser compatibility, [see our browser compatibility docs](../getting-started/#support).
We publicly list browser bugs that are impacting us here, in the hopes of expediting the process of fixing them. For information on Bootstrap's browser compatibility, [see our browser compatibility docs](../getting-started/#support).
@@ -7,7 +7,7 @@ Provide contextual feedback messages for typical user actions with the handful o
...
@@ -7,7 +7,7 @@ Provide contextual feedback messages for typical user actions with the handful o
Wrap any text and an optional dismiss button in `.alert` and one of the four contextual classes (e.g., `.alert-success`) for basic alert messages.
Wrap any text and an optional dismiss button in `.alert` and one of the four contextual classes (e.g., `.alert-success`) for basic alert messages.
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>No default class</h4>
<h4>No default class</h4>
<p>Alerts don't have default classes, only base and modifier classes. A default gray alert doesn't make too much sense, so you're required to specify a type via contextual class. Choose from success, info, warning, or danger.</p>
<p>Alerts don't have default classes, only base and modifier classes. A default gray alert doesn't make too much sense, so you're required to specify a type via contextual class. Choose from success, info, warning, or danger.</p>
</div>
</div>
...
@@ -41,7 +41,7 @@ Build on any alert by adding an optional `.alert-dismissible` and [close button]
...
@@ -41,7 +41,7 @@ Build on any alert by adding an optional `.alert-dismissible` and [close button]
</div>
</div>
{% endexample %}
{% endexample %}
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Ensure proper behavior across all devices</h4>
<h4>Ensure proper behavior across all devices</h4>
<p>Be sure to use the <code><button></code> element with the <code>data-dismiss="alert"</code> data attribute.</p>
<p>Be sure to use the <code><button></code> element with the <code>data-dismiss="alert"</code> data attribute.</p>
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](../javascript/#buttons).
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](../javascript/#buttons).
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Tooltips & popovers in button groups require special setting</h4>
<h4>Tooltips & popovers in button groups require special setting</h4>
<p>When using tooltips or popovers on elements within a <code>.btn-group</code>, you'll have to specify the option <code>container: 'body'</code> to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).</p>
<p>When using tooltips or popovers on elements within a <code>.btn-group</code>, you'll have to specify the option <code>container: 'body'</code> to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Ensure correct <code>role</code> and provide a label</h4>
<h4>Ensure correct <code>role</code> and provide a label</h4>
<p>In order for assistive technologies – such as screen readers – to convey that a series of buttons is grouped, an appropriate <code>role</code> attribute needs to be provided. For button groups, this would be <code>role="group"</code>, while toolbars should have a <code>role="toolbar"</code>.</p>
<p>In order for assistive technologies – such as screen readers – to convey that a series of buttons is grouped, an appropriate <code>role</code> attribute needs to be provided. For button groups, this would be <code>role="group"</code>, while toolbars should have a <code>role="toolbar"</code>.</p>
<p>In addition, groups and toolbars should be given an explicit label, as most assistive technologies will otherwise not announce them, despite the presence of the correct <code>role</code> attribute. In the examples provided here, we use <code>aria-label</code>, but alternatives such as <code>aria-labelledby</code> can also be used.</p>
<p>In addition, groups and toolbars should be given an explicit label, as most assistive technologies will otherwise not announce them, despite the presence of the correct <code>role</code> attribute. In the examples provided here, we use <code>aria-label</code>, but alternatives such as <code>aria-labelledby</code> can also be used.</p>
...
@@ -55,7 +55,7 @@ Combine sets of button groups into button toolbars for more complex components.
...
@@ -55,7 +55,7 @@ Combine sets of button groups into button toolbars for more complex components.
Instead of applying button sizing classes to every button in a group, just add `.btn-group-*` to each `.btn-group`, including each one when nesting multiple groups.
Instead of applying button sizing classes to every button in a group, just add `.btn-group-*` to each `.btn-group`, including each one when nesting multiple groups.
<h4>Transition animations not supported in Internet Explorer 9</h4>
<h4>Transition animations not supported in Internet Explorer 9</h4>
<p>Bootstrap exclusively uses CSS3 for its animations, but Internet Explorer 9 doesn't support the necessary CSS properties. Thus, there are no slide transition animations when using that browser. We have intentionally decided not to include jQuery-based fallbacks for the transitions.</p>
<p>Bootstrap exclusively uses CSS3 for its animations, but Internet Explorer 9 doesn't support the necessary CSS properties. Thus, there are no slide transition animations when using that browser. We have intentionally decided not to include jQuery-based fallbacks for the transitions.</p>
<p>The <code>.active</code> class needs to be added to one of the slides. Otherwise, the carousel will not be visible.</p>
<p>The <code>.active</code> class needs to be added to one of the slides. Otherwise, the carousel will not be visible.</p>
</div>
</div>
...
@@ -50,7 +50,7 @@ A slideshow component for cycling through elements—images or slides of text—
...
@@ -50,7 +50,7 @@ A slideshow component for cycling through elements—images or slides of text—
Add captions to your slides easily with the `.carousel-caption` element within any `.carousel-item`. Place just about any optional HTML within there and it will be automatically aligned and formatted.
Add captions to your slides easily with the `.carousel-caption` element within any `.carousel-item`. Place just about any optional HTML within there and it will be automatically aligned and formatted.
@@ -101,7 +101,7 @@ Add captions to your slides easily with the `.carousel-caption` element within a
...
@@ -101,7 +101,7 @@ Add captions to your slides easily with the `.carousel-caption` element within a
</div>
</div>
{% endhighlight %}
{% endhighlight %}
<divclass="bs-callout bs-callout-danger">
<divclass="bd-callout bd-callout-danger">
<h4>Accessibility issue</h4>
<h4>Accessibility issue</h4>
<p>The carousel component is generally not compliant with accessibility standards. If you need to be compliant, please consider other options for presenting your content.</p>
<p>The carousel component is generally not compliant with accessibility standards. If you need to be compliant, please consider other options for presenting your content.</p>
Flexible plugin that utilizes a handful of classes for easy toggle behavior.
Flexible plugin that utilizes a handful of classes for easy toggle behavior.
<divclass="bs-callout bs-callout-danger">
<divclass="bd-callout bd-callout-danger">
<h4>Plugin dependency</h4>
<h4>Plugin dependency</h4>
<p>Collapse requires the <ahref="#transitions">transitions plugin</a> to be included in your version of Bootstrap.</p>
<p>Collapse requires the <ahref="#transitions">transitions plugin</a> to be included in your version of Bootstrap.</p>
</div>
</div>
...
@@ -87,7 +87,7 @@ Extend the default collapse behavior to create an accordion with the panel compo
...
@@ -87,7 +87,7 @@ Extend the default collapse behavior to create an accordion with the panel compo
</div>
</div>
{% endexample %}
{% endexample %}
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Make expand/collapse controls accessible</h4>
<h4>Make expand/collapse controls accessible</h4>
<p>Be sure to add <code>aria-expanded</code> to the control element. This attribute explicitly defines the current state of the collapsible element to screen readers and similar assistive technologies. If the collapsible element is closed by default, it should have a value of <code>aria-expanded="false"</code>. If you've set the collapsible element to be open by default using the <code>in</code> class, set <code>aria-expanded="true"</code> on the control instead. The plugin will automatically toggle this attribute based on whether or not the collapsible element has been opened or closed.</p>
<p>Be sure to add <code>aria-expanded</code> to the control element. This attribute explicitly defines the current state of the collapsible element to screen readers and similar assistive technologies. If the collapsible element is closed by default, it should have a value of <code>aria-expanded="false"</code>. If you've set the collapsible element to be open by default using the <code>in</code> class, set <code>aria-expanded="true"</code> on the control instead. The plugin will automatically toggle this attribute based on whether or not the collapsible element has been opened or closed.</p>
<p>Additionally, if your control element is targetting a single collapsible element – i.e. the <code>data-target</code> attribute is pointing to an <code>id</code> selector – you may add an additional <code>aria-controls</code> attribute to the control element, containing the <code>id</code> of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself.</p>
<p>Additionally, if your control element is targetting a single collapsible element – i.e. the <code>data-target</code> attribute is pointing to an <code>id</code> selector – you may add an additional <code>aria-controls</code> attribute to the control element, containing the <code>id</code> of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself.</p>
@@ -32,7 +32,7 @@ Wrap the dropdown's trigger and the dropdown menu within `.dropdown`, or another
...
@@ -32,7 +32,7 @@ Wrap the dropdown's trigger and the dropdown menu within `.dropdown`, or another
By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add `.dropdown-menu-right` to a `.dropdown-menu` to right align the dropdown menu.
By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add `.dropdown-menu-right` to a `.dropdown-menu` to right align the dropdown menu.
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>May require additional positioning</h4>
<h4>May require additional positioning</h4>
<p>Dropdowns are automatically positioned via CSS within the normal flow of the document. This means dropdowns may be cropped by parents with certain <code>overflow</code> properties or appear out of bounds of the viewport. Address these issues on your own as they arise.</p>
<p>Dropdowns are automatically positioned via CSS within the normal flow of the document. This means dropdowns may be cropped by parents with certain <code>overflow</code> properties or appear out of bounds of the viewport. Address these issues on your own as they arise.</p>
</div>
</div>
...
@@ -146,7 +146,7 @@ Call the dropdowns via JavaScript:
...
@@ -146,7 +146,7 @@ Call the dropdowns via JavaScript:
$('.dropdown-toggle').dropdown()
$('.dropdown-toggle').dropdown()
{% endhighlight %}
{% endhighlight %}
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4><code>data-toggle="dropdown"</code> still required</h4>
<h4><code>data-toggle="dropdown"</code> still required</h4>
<p>Regardless of whether you call your dropdown via JavaScript or instead use the data-api, <code>data-toggle="dropdown"</code> is always required to be present on the dropdown's trigger element.</p>
<p>Regardless of whether you call your dropdown via JavaScript or instead use the data-api, <code>data-toggle="dropdown"</code> is always required to be present on the dropdown's trigger element.</p>
@@ -16,11 +16,11 @@ Convey meaning through color with a handful of emphasis utility classes. These m
...
@@ -16,11 +16,11 @@ Convey meaning through color with a handful of emphasis utility classes. These m
<pclass="text-danger">Donec ullamcorper nulla non metus auctor fringilla.</p>
<pclass="text-danger">Donec ullamcorper nulla non metus auctor fringilla.</p>
{% endexample %}
{% endexample %}
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>Dealing with specificity</h4>
<h4>Dealing with specificity</h4>
<p>Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <code><span></code> with the class.</p>
<p>Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <code><span></code> with the class.</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Conveying meaning to assistive technologies</h4>
<h4>Conveying meaning to assistive technologies</h4>
<p>Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the contextual colors are only used to reinforce meaning that is already present in the text/markup), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p>
<p>Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the contextual colors are only used to reinforce meaning that is already present in the text/markup), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p>
</div>
</div>
...
@@ -37,12 +37,12 @@ Similar to the contextual text color classes, easily set the background of an el
...
@@ -37,12 +37,12 @@ Similar to the contextual text color classes, easily set the background of an el
<divclass="bg-danger">Donec ullamcorper nulla non metus auctor fringilla.</div>
<divclass="bg-danger">Donec ullamcorper nulla non metus auctor fringilla.</div>
{% endexample %}
{% endexample %}
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>Dealing with specificity</h4>
<h4>Dealing with specificity</h4>
<p>Sometimes contextual background classes cannot be applied due to the specificity of another selector. In some cases, a sufficient workaround is to wrap your element's content in a <code><div></code> with the class.</p>
<p>Sometimes contextual background classes cannot be applied due to the specificity of another selector. In some cases, a sufficient workaround is to wrap your element's content in a <code><div></code> with the class.</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Conveying meaning to assistive technologies</h4>
<h4>Conveying meaning to assistive technologies</h4>
<p>As with <ahref="#helper-classes-colors">contextual colors</a>, ensure that any meaning conveyed through color is also conveyed in a format that is not purely presentational.</p>
<p>As with <ahref="#helper-classes-colors">contextual colors</a>, ensure that any meaning conveyed through color is also conveyed in a format that is not purely presentational.</p>
<p>Always try to place a modal's HTML code in a top-level position in your document to avoid other components affecting the modal's appearance and/or functionality.</p>
<p>Always try to place a modal's HTML code in a top-level position in your document to avoid other components affecting the modal's appearance and/or functionality.</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Mobile device caveats</h4>
<h4>Mobile device caveats</h4>
<p>There are some caveats regarding using modals on mobile devices. <ahref="../getting-started/#support-fixed-position-keyboards">See our browser support docs</a> for details.</p>
<p>There are some caveats regarding using modals on mobile devices. <ahref="../getting-started/#support-fixed-position-keyboards">See our browser support docs</a> for details.</p>
</div>
</div>
...
@@ -30,7 +30,7 @@ $('#myModal').on('shown.bs.modal', function () {
...
@@ -30,7 +30,7 @@ $('#myModal').on('shown.bs.modal', function () {
A rendered modal with header, body, and set of actions in the footer.</p>
A rendered modal with header, body, and set of actions in the footer.</p>
<divclass="bs-example bs-example-modal">
<divclass="bd-example bd-example-modal">
<divclass="modal">
<divclass="modal">
<divclass="modal-dialog">
<divclass="modal-dialog">
<divclass="modal-content">
<divclass="modal-content">
...
@@ -123,7 +123,7 @@ Toggle a modal via JavaScript by clicking the button below. It will slide down a
...
@@ -123,7 +123,7 @@ Toggle a modal via JavaScript by clicking the button below. It will slide down a
@@ -158,13 +158,13 @@ Toggle a modal via JavaScript by clicking the button below. It will slide down a
...
@@ -158,13 +158,13 @@ Toggle a modal via JavaScript by clicking the button below. It will slide down a
</div>
</div>
{% endhighlight %}
{% endhighlight %}
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Make modals accessible</h4>
<h4>Make modals accessible</h4>
<p>Be sure to add <code>role="dialog"</code> to <code>.modal</code>, <code>aria-labelledby="myModalLabel"</code> attribute to reference the modal title, and <code>aria-hidden="true"</code> to tell assistive technologies to skip the modal's DOM elements.</p>
<p>Be sure to add <code>role="dialog"</code> to <code>.modal</code>, <code>aria-labelledby="myModalLabel"</code> attribute to reference the modal title, and <code>aria-hidden="true"</code> to tell assistive technologies to skip the modal's DOM elements.</p>
<p>Additionally, you may give a description of your modal dialog with <code>aria-describedby</code> on <code>.modal</code>.</p>
<p>Additionally, you may give a description of your modal dialog with <code>aria-describedby</code> on <code>.modal</code>.</p>
</div>
</div>
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>Embedding YouTube videos</h4>
<h4>Embedding YouTube videos</h4>
<p>Embedding YouTube videos in modals requires additional JavaScript not in Bootstrap to automatically stop playback and more. <ahref="http://stackoverflow.com/questions/18622508/bootstrap-3-and-youtube-in-modal">See this helpful Stack Overflow post</a> for more information.</p>
<p>Embedding YouTube videos in modals requires additional JavaScript not in Bootstrap to automatically stop playback and more. <ahref="http://stackoverflow.com/questions/18622508/bootstrap-3-and-youtube-in-modal">See this helpful Stack Overflow post</a> for more information.</p>
</div>
</div>
...
@@ -173,16 +173,16 @@ Toggle a modal via JavaScript by clicking the button below. It will slide down a
...
@@ -173,16 +173,16 @@ Toggle a modal via JavaScript by clicking the button below. It will slide down a
Modals have two optional sizes, available via modifier classes to be placed on a `.modal-dialog`.
Modals have two optional sizes, available via modifier classes to be placed on a `.modal-dialog`.
@@ -307,7 +307,7 @@ To take advantage of the Bootstrap grid system within a modal, just nest `.conta
...
@@ -307,7 +307,7 @@ To take advantage of the Bootstrap grid system within a modal, just nest `.conta
Have a bunch of buttons that all trigger the same modal, just with slightly different contents? Use `event.relatedTarget` and [HTML `data-*` attributes](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes) (possibly [via jQuery](http://api.jquery.com/data/)) to vary the contents of the modal depending on which button was clicked. See the Modal Events docs for details on `relatedTarget`.
Have a bunch of buttons that all trigger the same modal, just with slightly different contents? Use `event.relatedTarget` and [HTML `data-*` attributes](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes) (possibly [via jQuery](http://api.jquery.com/data/)) to vary the contents of the modal depending on which button was clicked. See the Modal Events docs for details on `relatedTarget`.
{% example html %}
{% example html %}
<div class="bs-example">
<div class="bd-example">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">Open modal for @mdo</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">Open modal for @mdo</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@fat">Open modal for @fat</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@fat">Open modal for @fat</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@getbootstrap">Open modal for @getbootstrap</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@getbootstrap">Open modal for @getbootstrap</button>
@@ -7,11 +7,11 @@ Add small overlays of content, like those on the iPad, to any element for housin
...
@@ -7,11 +7,11 @@ Add small overlays of content, like those on the iPad, to any element for housin
Popovers whose both title and content are zero-length are never displayed.
Popovers whose both title and content are zero-length are never displayed.
<divclass="bs-callout bs-callout-danger">
<divclass="bd-callout bd-callout-danger">
<h4>Plugin dependency</h4>
<h4>Plugin dependency</h4>
<p>Popovers require the <ahref="#tooltips">tooltip plugin</a> to be included in your version of Bootstrap.</p>
<p>Popovers require the <ahref="#tooltips">tooltip plugin</a> to be included in your version of Bootstrap.</p>
</div>
</div>
<divclass="bs-callout bs-callout-danger">
<divclass="bd-callout bd-callout-danger">
<h4>Opt-in functionality</h4>
<h4>Opt-in functionality</h4>
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
<p>One way to initialize all popovers on a page would be to select them by their <code>data-toggle</code> attribute:</p>
<p>One way to initialize all popovers on a page would be to select them by their <code>data-toggle</code> attribute:</p>
...
@@ -21,19 +21,19 @@ $(function () {
...
@@ -21,19 +21,19 @@ $(function () {
})
})
{% endhighlight %}
{% endhighlight %}
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Popovers in button groups and input groups require special setting</h4>
<h4>Popovers in button groups and input groups require special setting</h4>
<p>When using popovers on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).</p>
<p>When using popovers on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Don't try to show popovers on hidden elements</h4>
<h4>Don't try to show popovers on hidden elements</h4>
<p>Invoking <code>$(...).popover('show')</code> when the target element is <code>display: none;</code> will cause the popover to be incorrectly positioned.</p>
<p>Invoking <code>$(...).popover('show')</code> when the target element is <code>display: none;</code> will cause the popover to be incorrectly positioned.</p>
</div>
</div>
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>Popovers on disabled elements require wrapper elements</h4>
<h4>Popovers on disabled elements require wrapper elements</h4>
<p>To add a popover to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code><div></code> and apply the popover to that <code><div></code> instead.</p>
<p>To add a popover to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code><div></code> and apply the popover to that <code><div></code> instead.</p>
</div>
</div>
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>Multiple-line links</h4>
<h4>Multiple-line links</h4>
<p>Sometimes you want to add a popover to a hyperlink that wraps multiple lines. The default behavior of the popover plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
<p>Sometimes you want to add a popover to a hyperlink that wraps multiple lines. The default behavior of the popover plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
</div>
</div>
...
@@ -42,7 +42,7 @@ $(function () {
...
@@ -42,7 +42,7 @@ $(function () {
Four options are available: top, right, bottom, and left aligned.
Four options are available: top, right, bottom, and left aligned.
<divclass="bs-example bs-example-popover">
<divclass="bd-example bd-example-popover">
<divclass="popover popover-top">
<divclass="popover popover-top">
<divclass="popover-arrow"></div>
<divclass="popover-arrow"></div>
<h3class="popover-title">Popover top</h3>
<h3class="popover-title">Popover top</h3>
...
@@ -82,13 +82,13 @@ Four options are available: top, right, bottom, and left aligned.
...
@@ -82,13 +82,13 @@ Four options are available: top, right, bottom, and left aligned.
### Live demo
### Live demo
{% example html %}
{% example html %}
<buttontype="button"class="btn btn-lg btn-danger bs-docs-popover"data-toggle="popover"title="Popover title"data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>
<buttontype="button"class="btn btn-lg btn-danger bd-popover"data-toggle="popover"title="Popover title"data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>
{% endexample %}
{% endexample %}
#### Four directions
#### Four directions
<divclass="bs-example popover-demo">
<divclass="bd-example popover-demo">
<divclass="bs-example-popovers">
<divclass="bd-example-popovers">
<buttontype="button"class="btn btn-secondary"data-container="body"data-toggle="popover"data-placement="left"data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
<buttontype="button"class="btn btn-secondary"data-container="body"data-toggle="popover"data-placement="left"data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on left
Popover on left
</button>
</button>
...
@@ -127,13 +127,13 @@ sagittis lacus vel augue laoreet rutrum faucibus.">
...
@@ -127,13 +127,13 @@ sagittis lacus vel augue laoreet rutrum faucibus.">
Use the `focus` trigger to dismiss popovers on the next click that the user makes.
Use the `focus` trigger to dismiss popovers on the next click that the user makes.
<divclass="bs-callout bs-callout-danger">
<divclass="bd-callout bd-callout-danger">
<h4>Specific markup required for dismiss-on-next-click</h4>
<h4>Specific markup required for dismiss-on-next-click</h4>
<p>For proper cross-browser and cross-platform behavior, you must use the <code><a></code> tag, <i>not</i> the <code><button></code> tag, and you also must include a <ahref="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#tabindex"><code>tabindex</code></a> attribute.</p>
<p>For proper cross-browser and cross-platform behavior, you must use the <code><a></code> tag, <i>not</i> the <code><button></code> tag, and you also must include a <ahref="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#tabindex"><code>tabindex</code></a> attribute.</p>
</div>
</div>
{% example html %}
{% example html %}
<atabindex="0"class="btn btn-lg btn-danger bs-docs-popover"role="button"data-toggle="popover"data-trigger="focus"title="Dismissible popover"data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a>
<atabindex="0"class="btn btn-lg btn-danger bd-popover"role="button"data-toggle="popover"data-trigger="focus"title="Dismissible popover"data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a>
{% endexample %}
{% endexample %}
{% highlight js %}
{% highlight js %}
...
@@ -258,7 +258,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
...
@@ -258,7 +258,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
</table>
</table>
</div>
</div>
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>Data attributes for individual popovers</h4>
<h4>Data attributes for individual popovers</h4>
<p>Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.</p>
<p>Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.</p>
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.
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.
<p>Navbar links must have resolvable id targets. For example, a <code><a href="#home">home</a></code> must correspond to something in the DOM like <code><div id="home"></div></code>.</p>
<p>Navbar links must have resolvable id targets. For example, a <code><a href="#home">home</a></code> must correspond to something in the DOM like <code><div id="home"></div></code>.</p>
</div>
</div>
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>Non-<code>:visible</code> target elements ignored</h4>
<h4>Non-<code>:visible</code> target elements ignored</h4>
<p>Target elements that are not <ahref="http://api.jquery.com/visible-selector/"><code>:visible</code> according to jQuery</a> will be ignored and their corresponding nav items will never be highlighted.</p>
<p>Target elements that are not <ahref="http://api.jquery.com/visible-selector/"><code>:visible</code> according to jQuery</a> will be ignored and their corresponding nav items will never be highlighted.</p>
@@ -11,7 +11,7 @@ Tooltips with zero-length titles are never displayed.
...
@@ -11,7 +11,7 @@ Tooltips with zero-length titles are never displayed.
Hover over the links below to see tooltips:
Hover over the links below to see tooltips:
<divclass="bs-example tooltip-demo">
<divclass="bd-example tooltip-demo">
<pclass="muted">Tight pants next level keffiyeh <ahref="#"data-toggle="tooltip"title="Default tooltip">you probably</a> 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 <ahref="#"data-toggle="tooltip"title="Another tooltip">have a</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 <ahref="#"data-toggle="tooltip"title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <ahref="#"data-toggle="tooltip"title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
<pclass="muted">Tight pants next level keffiyeh <ahref="#"data-toggle="tooltip"title="Default tooltip">you probably</a> 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 <ahref="#"data-toggle="tooltip"title="Another tooltip">have a</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 <ahref="#"data-toggle="tooltip"title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <ahref="#"data-toggle="tooltip"title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
</p>
</p>
</div>
</div>
...
@@ -20,7 +20,7 @@ Hover over the links below to see tooltips:
...
@@ -20,7 +20,7 @@ Hover over the links below to see tooltips:
Four options are available: top, right, bottom, and left aligned.
Four options are available: top, right, bottom, and left aligned.
<divclass="bs-example bs-example-tooltip">
<divclass="bd-example bd-example-tooltip">
<divclass="tooltip left"role="tooltip">
<divclass="tooltip left"role="tooltip">
<divclass="tooltip-arrow"></div>
<divclass="tooltip-arrow"></div>
<divclass="tooltip-inner">
<divclass="tooltip-inner">
...
@@ -51,8 +51,8 @@ Four options are available: top, right, bottom, and left aligned.
...
@@ -51,8 +51,8 @@ Four options are available: top, right, bottom, and left aligned.
Hover over the buttons below to see their tooltips.
Hover over the buttons below to see their tooltips.
<divclass="bs-example tooltip-demo">
<divclass="bd-example tooltip-demo">
<divclass="bs-example-tooltips">
<divclass="bd-example-tooltips">
<buttontype="button"class="btn btn-secondary"data-toggle="tooltip"data-placement="left"title="Tooltip on left">Tooltip on left</button>
<buttontype="button"class="btn btn-secondary"data-toggle="tooltip"data-placement="left"title="Tooltip on left">Tooltip on left</button>
<buttontype="button"class="btn btn-secondary"data-toggle="tooltip"data-placement="top"title="Tooltip on top">Tooltip on top</button>
<buttontype="button"class="btn btn-secondary"data-toggle="tooltip"data-placement="top"title="Tooltip on top">Tooltip on top</button>
<buttontype="button"class="btn btn-secondary"data-toggle="tooltip"data-placement="bottom"title="Tooltip on bottom">Tooltip on bottom</button>
<buttontype="button"class="btn btn-secondary"data-toggle="tooltip"data-placement="bottom"title="Tooltip on bottom">Tooltip on bottom</button>
...
@@ -75,7 +75,7 @@ Hover over the buttons below to see their tooltips.
...
@@ -75,7 +75,7 @@ Hover over the buttons below to see their tooltips.
</button>
</button>
{% endhighlight %}
{% endhighlight %}
<divclass="bs-callout bs-callout-danger">
<divclass="bd-callout bd-callout-danger">
<h4>Opt-in functionality</h4>
<h4>Opt-in functionality</h4>
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
<p>One way to initialize all tooltips on a page would be to select them by their <code>data-toggle</code> attribute:</p>
<p>One way to initialize all tooltips on a page would be to select them by their <code>data-toggle</code> attribute:</p>
...
@@ -85,15 +85,15 @@ $(function () {
...
@@ -85,15 +85,15 @@ $(function () {
})
})
{% endhighlight %}
{% endhighlight %}
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Tooltips in button groups and input groups require special setting</h4>
<h4>Tooltips in button groups and input groups require special setting</h4>
<p>When using tooltips on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).</p>
<p>When using tooltips on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Don't try to show tooltips on hidden elements</h4>
<h4>Don't try to show tooltips on hidden elements</h4>
<p>Invoking <code>$(...).tooltip('show')</code> when the target element is <code>display: none;</code> will cause the tooltip to be incorrectly positioned.</p>
<p>Invoking <code>$(...).tooltip('show')</code> when the target element is <code>display: none;</code> will cause the tooltip to be incorrectly positioned.</p>
</div>
</div>
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>Tooltips on disabled elements require wrapper elements</h4>
<h4>Tooltips on disabled elements require wrapper elements</h4>
<p>To add a tooltip to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code><div></code> and apply the tooltip to that <code><div></code> instead.</p>
<p>To add a tooltip to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code><div></code> and apply the tooltip to that <code><div></code> instead.</p>
The required markup for a tooltip is only a `data` attribute and `title` on the HTML element you wish to have a tooltip. The generated markup of a tooltip is rather simple, though it does require a position (by default, set to `top` by the plugin).
The required markup for a tooltip is only a `data` attribute and `title` on the HTML element you wish to have a tooltip. The generated markup of a tooltip is rather simple, though it does require a position (by default, set to `top` by the plugin).
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Multiple-line links</h4>
<h4>Multiple-line links</h4>
<p>Sometimes you want to add a tooltip to a hyperlink that wraps multiple lines. The default behavior of the tooltip plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
<p>Sometimes you want to add a tooltip to a hyperlink that wraps multiple lines. The default behavior of the tooltip plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
</div>
</div>
...
@@ -228,7 +228,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
...
@@ -228,7 +228,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
</table>
</table>
</div>
</div>
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>Data attributes for individual tooltips</h4>
<h4>Data attributes for individual tooltips</h4>
<p>Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.</p>
<p>Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.</p>
<h4>Conveying meaning to assistive technologies</h4>
<h4>Conveying meaning to assistive technologies</h4>
<p>Using color to add meaning to a button only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the visible text of the button), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p>
<p>Using color to add meaning to a button only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the visible text of the button), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p>
</div>
</div>
...
@@ -45,12 +45,12 @@ Use the button classes on an `<a>`, `<button>`, or `<input>` element.
...
@@ -45,12 +45,12 @@ Use the button classes on an `<a>`, `<button>`, or `<input>` element.
<p>If the <code><a></code> elements are used to act as buttons – triggering in-page functionality, rather than navigating to another document or section within the current page – they should also be given an appropriate <code>role="button"</code>.</p>
<p>If the <code><a></code> elements are used to act as buttons – triggering in-page functionality, rather than navigating to another document or section within the current page – they should also be given an appropriate <code>role="button"</code>.</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Cross-browser rendering</h4>
<h4>Cross-browser rendering</h4>
<p>As a best practice, <strong>we highly recommend using the <code><button></code> element whenever possible</strong> to ensure matching cross-browser rendering.</p>
<p>As a best practice, <strong>we highly recommend using the <code><button></code> element whenever possible</strong> to ensure matching cross-browser rendering.</p>
</div>
</div>
...
@@ -106,17 +106,17 @@ As `<a>` elements don't support the `disabled` attribute, you must add the `.dis
...
@@ -106,17 +106,17 @@ As `<a>` elements don't support the `disabled` attribute, you must add the `.dis
<p>If you add the <code>disabled</code> attribute to a <code><button></code>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.</p>
<p>If you add the <code>disabled</code> attribute to a <code><button></code>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Link functionality caveat</h4>
<h4>Link functionality caveat</h4>
<p>This class uses <code>pointer-events: none</code> to try to disable the link functionality of <code><a></code>s, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. In addition, even in browsers that do support <code>pointer-events: none</code>, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, use custom JavaScript to disable such links.</p>
<p>This class uses <code>pointer-events: none</code> to try to disable the link functionality of <code><a></code>s, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. In addition, even in browsers that do support <code>pointer-events: none</code>, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, use custom JavaScript to disable such links.</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Context-specific usage</h4>
<h4>Context-specific usage</h4>
<p>While button classes can be used on <code><a></code> and <code><button></code> elements, only <code><button></code> elements are supported within our nav and navbar components.</p>
<p>While button classes can be used on <code><a></code> and <code><button></code> elements, only <code><button></code> elements are supported within our nav and navbar components.</p>
@@ -33,7 +33,7 @@ Individual form controls automatically receive some global styling. All textual
...
@@ -33,7 +33,7 @@ Individual form controls automatically receive some global styling. All textual
</form>
</form>
{% endexample %}
{% endexample %}
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Don't mix form groups with input groups</h4>
<h4>Don't mix form groups with input groups</h4>
<p>Do not mix form groups directly with <ahref="/components/#input-groups">input groups</a>. Instead, nest the input group inside of the form group.</p>
<p>Do not mix form groups directly with <ahref="/components/#input-groups">input groups</a>. Instead, nest the input group inside of the form group.</p>
</div>
</div>
...
@@ -42,11 +42,11 @@ Individual form controls automatically receive some global styling. All textual
...
@@ -42,11 +42,11 @@ Individual form controls automatically receive some global styling. All textual
Add `.form-inline` to your `<form>` or a parent element for left-aligned and inline-block controls. **This only applies to form controls within viewports that are at least 768px wide.**
Add `.form-inline` to your `<form>` or a parent element for left-aligned and inline-block controls. **This only applies to form controls within viewports that are at least 768px wide.**
<divclass="bs-callout bs-callout-danger">
<divclass="bd-callout bd-callout-danger">
<h4>May require custom widths</h4>
<h4>May require custom widths</h4>
<p>Inputs and selects have `width: 100%;` applied by default in Bootstrap. Within inline forms, we reset that to `width: auto;` so multiple controls can reside on the same line. Depending on your layout, additional custom widths may be required.</p>
<p>Inputs and selects have `width: 100%;` applied by default in Bootstrap. Within inline forms, we reset that to `width: auto;` so multiple controls can reside on the same line. Depending on your layout, additional custom widths may be required.</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Always add labels</h4>
<h4>Always add labels</h4>
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the `.sr-only` class.</p>
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the `.sr-only` class.</p>
</div>
</div>
...
@@ -54,7 +54,7 @@ Add `.form-inline` to your `<form>` or a parent element for left-aligned and inl
...
@@ -54,7 +54,7 @@ Add `.form-inline` to your `<form>` or a parent element for left-aligned and inl
@@ -147,7 +147,7 @@ Examples of standard form controls supported in an example form layout.
...
@@ -147,7 +147,7 @@ Examples of standard form controls supported in an example form layout.
Most common form control, text-based input fields. Includes support for all HTML5 types: `text`, `password`, `datetime`, `datetime-local`, `date`, `month`, `time`, `week`, `number`, `email`, `url`, `search`, `tel`, and `color`.
Most common form control, text-based input fields. Includes support for all HTML5 types: `text`, `password`, `datetime`, `datetime-local`, `date`, `month`, `time`, `week`, `number`, `email`, `url`, `search`, `tel`, and `color`.
<divclass="bs-callout bs-callout-danger">
<divclass="bd-callout bd-callout-danger">
<h4>Type declaration required</h4>
<h4>Type declaration required</h4>
<p>Inputs will only be fully styled if their `type` is properly declared.</p>
<p>Inputs will only be fully styled if their `type` is properly declared.</p>
</div>
</div>
...
@@ -156,7 +156,7 @@ Most common form control, text-based input fields. Includes support for all HTML
...
@@ -156,7 +156,7 @@ Most common form control, text-based input fields. Includes support for all HTML
<p>To add integrated text or buttons before and/or after any text-based `<input>`, <ahref="../components/#input-groups">check out the input group component</a>.</p>
<p>To add integrated text or buttons before and/or after any text-based `<input>`, <ahref="../components/#input-groups">check out the input group component</a>.</p>
</div>
</div>
...
@@ -323,13 +323,13 @@ When you need to place plain text next to a form label within a form, use the `.
...
@@ -323,13 +323,13 @@ When you need to place plain text next to a form label within a form, use the `.
We remove the default `outline` styles on some form controls and apply a `box-shadow` in its place for `:focus`.
We remove the default `outline` styles on some form controls and apply a `box-shadow` in its place for `:focus`.
<p>The above example input uses custom styles in our documentation to demonstrate the `:focus` state on a `.form-control`.</p>
<p>The above example input uses custom styles in our documentation to demonstrate the `:focus` state on a `.form-control`.</p>
</div>
</div>
...
@@ -367,12 +367,12 @@ Add the `disabled` attribute to a `<fieldset>` to disable all the controls withi
...
@@ -367,12 +367,12 @@ Add the `disabled` attribute to a `<fieldset>` to disable all the controls withi
</form>
</form>
{% endexample %}
{% endexample %}
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Caveat about link functionality of `<a>`</h4>
<h4>Caveat about link functionality of `<a>`</h4>
<p>By default, browsers will treat all native form controls (<code><input></code>, <code><select></code> and <code><button></code> elements) inside a <code><fieldset disabled></code> as disabled, preventing both keyboard and mouse interactions on them. However, if your form also includes <code><a ... class="btn btn-*"></code> elements, these will only be given a style of <code>pointer-events: none</code>. As noted in the section about <ahref="#buttons-disabled">disabled state for buttons</a> (and specifically in the sub-section for anchor elements), this CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11, and won't prevent keyboard users from being able to focus or activate these links. So to be safe, use custom JavaScript to disable such links.</p>
<p>By default, browsers will treat all native form controls (<code><input></code>, <code><select></code> and <code><button></code> elements) inside a <code><fieldset disabled></code> as disabled, preventing both keyboard and mouse interactions on them. However, if your form also includes <code><a ... class="btn btn-*"></code> elements, these will only be given a style of <code>pointer-events: none</code>. As noted in the section about <ahref="#buttons-disabled">disabled state for buttons</a> (and specifically in the sub-section for anchor elements), this CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11, and won't prevent keyboard users from being able to focus or activate these links. So to be safe, use custom JavaScript to disable such links.</p>
</div>
</div>
<divclass="bs-callout bs-callout-danger">
<divclass="bd-callout bd-callout-danger">
<h4>Cross-browser compatibility</h4>
<h4>Cross-browser compatibility</h4>
<p>While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below don't fully support the <code>disabled</code> attribute on a <code><fieldset></code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
<p>While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below don't fully support the <code>disabled</code> attribute on a <code><fieldset></code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
</div>
</div>
...
@@ -389,7 +389,7 @@ Add the `readonly` boolean attribute on an input to prevent modification of the
...
@@ -389,7 +389,7 @@ Add the `readonly` boolean attribute on an input to prevent modification of the
Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add `.has-warning`, `.has-error`, or `.has-success` to the parent element. Any `.control-label`, `.form-control`, and `.help-block` within that element will receive the validation styles.
Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add `.has-warning`, `.has-error`, or `.has-success` to the parent element. Any `.control-label`, `.form-control`, and `.help-block` within that element will receive the validation styles.
<h4>Conveying validation state to assistive technologies and colorblind users</h4>
<h4>Conveying validation state to assistive technologies and colorblind users</h4>
<p>Using these validation styles to denote the state of a form control only provides a visual, color-based indication, which will not be conveyed to users of assistive technologies - such as screen readers - or to colorblind users.</p>
<p>Using these validation styles to denote the state of a form control only provides a visual, color-based indication, which will not be conveyed to users of assistive technologies - such as screen readers - or to colorblind users.</p>
<p>Ensure that an alternative indication of state is also provided. For instance, you can include a hint about state in the form control's <code><label></code> text itself (as is the case in the following code example), include a <ahref="../components/#glyphicons">Glyphicon</a> (with appropriate alternative text using the <code>.sr-only</code> class - see the <ahref="../components/#glyphicons-examples">Glyphicon examples</a>), or by providing an additional <ahref="#forms-help-text">help text</a> block. Specifically for assistive technologies, invalid form controls can also be assigned an <code>aria-invalid="true"</code> attribute.</p>
<p>Ensure that an alternative indication of state is also provided. For instance, you can include a hint about state in the form control's <code><label></code> text itself (as is the case in the following code example), include a <ahref="../components/#glyphicons">Glyphicon</a> (with appropriate alternative text using the <code>.sr-only</code> class - see the <ahref="../components/#glyphicons-examples">Glyphicon examples</a>), or by providing an additional <ahref="#forms-help-text">help text</a> block. Specifically for assistive technologies, invalid form controls can also be assigned an <code>aria-invalid="true"</code> attribute.</p>
...
@@ -436,7 +436,7 @@ Bootstrap includes validation styles for error, warning, and success states on f
...
@@ -436,7 +436,7 @@ Bootstrap includes validation styles for error, warning, and success states on f
You can also add optional feedback icons with the addition of `.has-feedback` and the right icon.
You can also add optional feedback icons with the addition of `.has-feedback` and the right icon.
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Icons, labels, and input groups</h4>
<h4>Icons, labels, and input groups</h4>
<p>Manual positioning of feedback icons is required for inputs without a label and for <ahref="../components#input-groups">input groups</a> with an add-on on the right. You are strongly encouraged to provide labels for all inputs for accessibility reasons. If you wish to prevent labels from being displayed, hide them with the `sr-only` class. If you must do without labels, adjust the `top` value of the feedback icon. For input groups, adjust the `right` value to an appropriate pixel value depending on the width of your addon.</p>
<p>Manual positioning of feedback icons is required for inputs without a label and for <ahref="../components#input-groups">input groups</a> with an add-on on the right. You are strongly encouraged to provide labels for all inputs for accessibility reasons. If you wish to prevent labels from being displayed, hide them with the `sr-only` class. If you must do without labels, adjust the `top` value of the feedback icon. For input groups, adjust the `right` value to an appropriate pixel value depending on the width of your addon.</p>
@@ -9,7 +9,7 @@ Opt your images into responsive behavior (so they never become larger than their
...
@@ -9,7 +9,7 @@ Opt your images into responsive behavior (so they never become larger than their
Images in Bootstrap are responsive by default. `max-width: 100%;` and `height: auto;` are applied to the image so that it scales with the parent element.
Images in Bootstrap are responsive by default. `max-width: 100%;` and `height: auto;` are applied to the image so that it scales with the parent element.
<p>In Internet Explorer 9-10, SVG images with <code>.img-responsive</code> are disproportionately sized. To fix this, add <code>width: 100% \9;</code> where necessary. Bootstrap doesn't apply this automatically as it causes complications to other image formats.</p>
<p>In Internet Explorer 9-10, SVG images with <code>.img-responsive</code> are disproportionately sized. To fix this, add <code>width: 100% \9;</code> where necessary. Bootstrap doesn't apply this automatically as it causes complications to other image formats.</p>
</div>
</div>
...
@@ -26,7 +26,7 @@ Images in Bootstrap are responsive by default. `max-width: 100%;` and `height: a
...
@@ -26,7 +26,7 @@ Images in Bootstrap are responsive by default. `max-width: 100%;` and `height: a
Add classes to an `<img>` element to easily style images in any project.
Add classes to an `<img>` element to easily style images in any project.
<divclass="bs-example bs-example-images">
<divclass="bd-example bd-example-images">
<imgdata-src="holder.js/200x200"class="img-rounded"alt="A generic square placeholder image with rounded corners">
<imgdata-src="holder.js/200x200"class="img-rounded"alt="A generic square placeholder image with rounded corners">
<imgdata-src="holder.js/200x200"class="img-circle"alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible">
<imgdata-src="holder.js/200x200"class="img-circle"alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible">
<imgdata-src="holder.js/200x200"class="img-thumbnail"alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera">
<imgdata-src="holder.js/200x200"class="img-thumbnail"alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera">
...
@@ -42,7 +42,7 @@ Add classes to an `<img>` element to easily style images in any project.
...
@@ -42,7 +42,7 @@ Add classes to an `<img>` element to easily style images in any project.
Align images with the [helper float classes](/components/helpers) or [text alignment classes](/components/helpers). A simple centering class can also be used for `block` level images.
Align images with the [helper float classes](/components/helpers) or [text alignment classes](/components/helpers). A simple centering class can also be used for `block` level images.
<divclass="bs-example bs-example-images">
<divclass="bd-example bd-example-images">
<imgdata-src="holder.js/200x200"class="img-rounded pull-left"alt="A generic square placeholder image with rounded corners">
<imgdata-src="holder.js/200x200"class="img-rounded pull-left"alt="A generic square placeholder image with rounded corners">
<imgdata-src="holder.js/200x200"class="img-rounded pull-right"alt="A generic square placeholder image with rounded corners">
<imgdata-src="holder.js/200x200"class="img-rounded pull-right"alt="A generic square placeholder image with rounded corners">
</div>
</div>
...
@@ -52,7 +52,7 @@ Align images with the [helper float classes](/components/helpers) or [text align
...
@@ -52,7 +52,7 @@ Align images with the [helper float classes](/components/helpers) or [text align
@@ -342,7 +342,7 @@ Use contextual classes to color table rows or individual cells.
...
@@ -342,7 +342,7 @@ Use contextual classes to color table rows or individual cells.
</table>
</table>
</div>
</div>
<divclass="bs-example">
<divclass="bd-example">
<tableclass="table">
<tableclass="table">
<thead>
<thead>
<tr>
<tr>
...
@@ -433,12 +433,12 @@ Use contextual classes to color table rows or individual cells.
...
@@ -433,12 +433,12 @@ Use contextual classes to color table rows or individual cells.
Create responsive tables by wrapping any `.table` in `.table-responsive` to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.
Create responsive tables by wrapping any `.table` in `.table-responsive` to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.
<p>Responsive tables make use of <code>overflow-y: hidden</code>, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets.</p>
<p>Responsive tables make use of <code>overflow-y: hidden</code>, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets.</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Firefox and fieldsets</h4>
<h4>Firefox and fieldsets</h4>
<p>Firefox has some awkward fieldset styling involving <code>width</code> that interferes with the responsive table. This cannot be overriden without a Firefox-specific hack that we <strong>don't</strong> provide in Bootstrap:</p>
<p>Firefox has some awkward fieldset styling involving <code>width</code> that interferes with the responsive table. This cannot be overriden without a Firefox-specific hack that we <strong>don't</strong> provide in Bootstrap:</p>
{% highlight css %}
{% highlight css %}
...
@@ -449,7 +449,7 @@ Create responsive tables by wrapping any `.table` in `.table-responsive` to make
...
@@ -449,7 +449,7 @@ Create responsive tables by wrapping any `.table` in `.table-responsive` to make
<p>For more information, read <ahref="http://stackoverflow.com/questions/17408815/fieldset-resizes-wrong-appears-to-have-unremovable-min-width-min-content/17863685#17863685">this Stack Overflow answer</a>.</p>
<p>For more information, read <ahref="http://stackoverflow.com/questions/17408815/fieldset-resizes-wrong-appears-to-have-unremovable-min-width-min-content/17863685#17863685">this Stack Overflow answer</a>.</p>
@@ -20,7 +20,7 @@ These styles can be found within `scaffolding.less`.
...
@@ -20,7 +20,7 @@ These styles can be found within `scaffolding.less`.
All HTML headings, `<h1>` through `<h6>`, are available. `.h1` through `.h6` classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.
All HTML headings, `<h1>` through `<h6>`, are available. `.h1` through `.h6` classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.
<divclass="bs-example bs-example-type">
<divclass="bd-example bd-example-type">
<tableclass="table">
<tableclass="table">
<tbody>
<tbody>
<tr>
<tr>
...
@@ -62,7 +62,7 @@ All HTML headings, `<h1>` through `<h6>`, are available. `.h1` through `.h6` cla
...
@@ -62,7 +62,7 @@ All HTML headings, `<h1>` through `<h6>`, are available. `.h1` through `.h6` cla
Create lighter, secondary text in any heading with a generic `<small>` tag or the `.small` class.
Create lighter, secondary text in any heading with a generic `<small>` tag or the `.small` class.
<divclass="bs-example bs-example-type">
<divclass="bd-example bd-example-type">
<tableclass="table">
<tableclass="table">
<tbody>
<tbody>
<tr>
<tr>
...
@@ -131,7 +131,7 @@ Styling for common inline HTML5 elements.
...
@@ -131,7 +131,7 @@ Styling for common inline HTML5 elements.
<p><em>This line rendered as italicized text.</em></p>
<p><em>This line rendered as italicized text.</em></p>
{% endexample %}
{% endexample %}
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>Alternate elements</h4>
<h4>Alternate elements</h4>
<p>Feel free to use <code><b></code> and <code><i></code> in HTML5. <code><b></code> is meant to highlight words or phrases without conveying additional importance while <code><i></code> is mostly for voice, technical terms, etc.</p>
<p>Feel free to use <code><b></code> and <code><i></code> in HTML5. <code><b></code> is meant to highlight words or phrases without conveying additional importance while <code><i></code> is mostly for voice, technical terms, etc.</p>
@@ -9,7 +9,7 @@ Bootstrap follows common web standards and—with minimal extra effort—can be
...
@@ -9,7 +9,7 @@ Bootstrap follows common web standards and—with minimal extra effort—can be
If your navigation contains many links and comes before the main content in the DOM, add a `Skip to main content` link before the navigation (for a simple explanation, see this [A11Y Project article on skip navigation links](http://a11yproject.com/posts/skip-nav-links/)). Using the `.sr-only` class will visually hide the skip link, and the <code>.sr-only-focusable</code> class will ensure that the link becomes visible once focused (for sighted keyboard users).
If your navigation contains many links and comes before the main content in the DOM, add a `Skip to main content` link before the navigation (for a simple explanation, see this [A11Y Project article on skip navigation links](http://a11yproject.com/posts/skip-nav-links/)). Using the `.sr-only` class will visually hide the skip link, and the <code>.sr-only-focusable</code> class will ensure that the link becomes visible once focused (for sighted keyboard users).
<p>Due to long-standing shortcomings/bugs in Chrome (see <ahref="https://code.google.com/p/chromium/issues/detail?id=262171"title="Chromium bug tracker - Issue 262171: Focus should cycle from named anchor">issue 262171 in the Chromium bug tracker</a>) and Internet Explorer (see this article on <ahref="http://accessibleculture.org/articles/2010/05/in-page-links/">in-page links and focus order</a>), you will need to make sure that the target of your skip link is at least programmatically focusable by adding <code>tabindex="-1"</code>.</p>
<p>Due to long-standing shortcomings/bugs in Chrome (see <ahref="https://code.google.com/p/chromium/issues/detail?id=262171"title="Chromium bug tracker - Issue 262171: Focus should cycle from named anchor">issue 262171 in the Chromium bug tracker</a>) and Internet Explorer (see this article on <ahref="http://accessibleculture.org/articles/2010/05/in-page-links/">in-page links and focus order</a>), you will need to make sure that the target of your skip link is at least programmatically focusable by adding <code>tabindex="-1"</code>.</p>
<p>In addition, you may want to explicitly suppress a visible focus indication on the target (particularly as Chrome currently also sets focus on elements with <code>tabindex="-1"</code> when they are clicked with the mouse) with <code>#content:focus { outline: none; }</code>.</p>
<p>In addition, you may want to explicitly suppress a visible focus indication on the target (particularly as Chrome currently also sets focus on elements with <code>tabindex="-1"</code> when they are clicked with the mouse) with <code>#content:focus { outline: none; }</code>.</p>
<p>Note that this bug will also affect any other in-page links your site may be using, rendering them useless for keyboard users. You may consider adding a similar stop-gap fix to all other named anchors / fragment identifiers that act as link targets.</p>
<p>Note that this bug will also affect any other in-page links your site may be using, rendering them useless for keyboard users. You may consider adding a similar stop-gap fix to all other named anchors / fragment identifiers that act as link targets.</p>
<p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included, as shown in the <ahref="../quick-start">starter template</a>. <ahref="{{ site.repo }}/blob/v{{ site.current_version }}/bower.json">Consult our <code>bower.json</code></a> to see which versions of jQuery are supported.</p>
<p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included, as shown in the <ahref="../quick-start">starter template</a>. <ahref="{{ site.repo }}/blob/v{{ site.current_version }}/bower.json">Consult our <code>bower.json</code></a> to see which versions of jQuery are supported.</p>
Bootstrap's plugins don't fall back particularly gracefully when JavaScript is disabled. If you care about the user experience in this case, use [`<noscript>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript) to explain the situation (and how to re-enable JavaScript) to your users, and/or add your own custom fallbacks.
Bootstrap's plugins don't fall back particularly gracefully when JavaScript is disabled. If you care about the user experience in this case, use [`<noscript>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript) to explain the situation (and how to re-enable JavaScript) to your users, and/or add your own custom fallbacks.
<p><strong>Bootstrap does not officially support third-party JavaScript libraries</strong> like Prototype or jQuery UI. Despite <code>.noConflict</code> and namespaced events, there may be compatibility problems that you need to fix on your own.</p>
<p><strong>Bootstrap does not officially support third-party JavaScript libraries</strong> like Prototype or jQuery UI. Despite <code>.noConflict</code> and namespaced events, there may be compatibility problems that you need to fix on your own.</p>
@@ -17,9 +17,9 @@ title: Bootstrap · The world's most popular mobile-first and responsive f
...
@@ -17,9 +17,9 @@ title: Bootstrap · The world's most popular mobile-first and responsive f
</div>
</div>
</main>
</main>
<divclass="bs-docs-featurette hidden">
<divclass="bd-featurette hidden">
<divclass="container">
<divclass="container">
<h2class="bs-docs-featurette-title">Designed for everyone, everywhere.</h2>
<h2class="bd-featurette-title">Designed for everyone, everywhere.</h2>
<pclass="lead">Bootstrap makes front-end web development faster and easier. It's made for folks of all skill levels, devices of all shapes, and projects of all sizes.</p>
<pclass="lead">Bootstrap makes front-end web development faster and easier. It's made for folks of all skill levels, devices of all shapes, and projects of all sizes.</p>
<hrclass="half-rule">
<hrclass="half-rule">
...
@@ -49,14 +49,14 @@ title: Bootstrap · The world's most popular mobile-first and responsive f
...
@@ -49,14 +49,14 @@ title: Bootstrap · The world's most popular mobile-first and responsive f
</div>
</div>
</div>
</div>
<divclass="bs-docs-featurette hidden">
<divclass="bd-featurette hidden">
<divclass="container">
<divclass="container">
<h2class="bs-docs-featurette-title">Built with Bootstrap.</h2>
<h2class="bd-featurette-title">Built with Bootstrap.</h2>
<pclass="lead">Millions of amazing sites across the web are being built with Bootstrap. Get started on your own with our growing <ahref="../getting-started/#examples">collection of examples</a> or by exploring some of our favorites.</p>
<pclass="lead">Millions of amazing sites across the web are being built with Bootstrap. Get started on your own with our growing <ahref="../getting-started/#examples">collection of examples</a> or by exploring some of our favorites.</p>
Do more with buttons. Control button states or create groups of buttons for more components like toolbars.
Do more with buttons. Control button states or create groups of buttons for more components like toolbars.
<divclass="bs-callout bs-callout-danger">
<divclass="bd-callout bd-callout-danger">
<h4>Cross-browser compatibility</h4>
<h4>Cross-browser compatibility</h4>
<p><ahref="https://github.com/twbs/bootstrap/issues/793">Firefox persists form control states (disabledness and checkedness) across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>. See <ahref="https://bugzilla.mozilla.org/show_bug.cgi?id=654072">Mozilla bug #654072</a>.</p>
<p><ahref="https://github.com/twbs/bootstrap/issues/793">Firefox persists form control states (disabledness and checkedness) across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>. See <ahref="https://bugzilla.mozilla.org/show_bug.cgi?id=654072">Mozilla bug #654072</a>.</p>
</div>
</div>
...
@@ -15,7 +15,7 @@ Do more with buttons. Control button states or create groups of buttons for more
...
@@ -15,7 +15,7 @@ Do more with buttons. Control button states or create groups of buttons for more
Add `data-loading-text="Loading..."` to use a loading state on a button.
Add `data-loading-text="Loading..."` to use a loading state on a button.
<divclass="bs-callout bs-callout-info">
<divclass="bd-callout bd-callout-info">
<h4>Use whichever state you like!</h4>
<h4>Use whichever state you like!</h4>
<p>For the sake of this demonstration, we are using <code>data-loading-text</code> and <code>$().button('loading')</code>, but that's not the only state you can use. <ahref="#buttons-methods">See more on this below in the <code>$().button(string)</code> documentation</a>.</p>
<p>For the sake of this demonstration, we are using <code>data-loading-text</code> and <code>$().button('loading')</code>, but that's not the only state you can use. <ahref="#buttons-methods">See more on this below in the <code>$().button(string)</code> documentation</a>.</p>
</div>
</div>
...
@@ -43,7 +43,7 @@ Add `data-toggle="button"` to activate toggling on a single button.
...
@@ -43,7 +43,7 @@ Add `data-toggle="button"` to activate toggling on a single button.
</button>
</button>
{% endexample %}
{% endexample %}
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Pre-toggled buttons need <code>.active</code> and <code>aria-pressed="true"</code></h4>
<h4>Pre-toggled buttons need <code>.active</code> and <code>aria-pressed="true"</code></h4>
<p>For pre-toggled buttons, you must add the <code>.active</code> class and the <code>aria-pressed="true"</code> attribute to the <code>button</code> yourself.</p>
<p>For pre-toggled buttons, you must add the <code>.active</code> class and the <code>aria-pressed="true"</code> attribute to the <code>button</code> yourself.</p>
</div>
</div>
...
@@ -52,17 +52,17 @@ Add `data-toggle="button"` to activate toggling on a single button.
...
@@ -52,17 +52,17 @@ Add `data-toggle="button"` to activate toggling on a single button.
Add `data-toggle="buttons"` to a `.btn-group` containing checkbox or radio inputs to enable toggling in their respective styles.
Add `data-toggle="buttons"` to a `.btn-group` containing checkbox or radio inputs to enable toggling in their respective styles.
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Preselected options need <code>.active</code></h4>
<h4>Preselected options need <code>.active</code></h4>
<p>For preselected options, you must add the <code>.active</code> class to the input's <code>label</code> yourself.</p>
<p>For preselected options, you must add the <code>.active</code> class to the input's <code>label</code> yourself.</p>
</div>
</div>
<divclass="bs-callout bs-callout-warning">
<divclass="bd-callout bd-callout-warning">
<h4>Visual checked state only updated on click</h4>
<h4>Visual checked state only updated on click</h4>
<p>If the checked state of a checkbox button is updated without firing a <code>click</code> event on the button (e.g. via <code><input type="reset"></code> or via setting the <code>checked</code> property of the input), you will need to toggle the <code>.active</code> class on the input's <code>label</code> yourself.</p>
<p>If the checked state of a checkbox button is updated without firing a <code>click</code> event on the button (e.g. via <code><input type="reset"></code> or via setting the <code>checked</code> property of the input), you will need to toggle the <code>.active</code> class on the input's <code>label</code> yourself.</p>