aboutsummaryrefslogtreecommitdiff
path: root/docs/_includes/js
diff options
context:
space:
mode:
authorJames Friend <[email protected]>2014-08-28 09:32:08 +0800
committerJames Friend <[email protected]>2014-08-28 09:32:08 +0800
commit9aeaf19b1dca68ee71e916ae415a0c270a47d301 (patch)
treebc8385acb8ec7a46bba03ff2ef7e4283cd9f1146 /docs/_includes/js
parente7991a9a1e2f474c8f1d8a2e0ed113816f1c5e82 (diff)
parent35f09315ed543a0479719afa2143240952c215db (diff)
downloadbootstrap-9aeaf19b1dca68ee71e916ae415a0c270a47d301.tar.xz
bootstrap-9aeaf19b1dca68ee71e916ae415a0c270a47d301.zip
Merge remote-tracking branch 'upstream/master' into node-requirable
Conflicts: Gruntfile.js
Diffstat (limited to 'docs/_includes/js')
-rw-r--r--docs/_includes/js/affix.html20
-rw-r--r--docs/_includes/js/alerts.html34
-rw-r--r--docs/_includes/js/buttons.html145
-rw-r--r--docs/_includes/js/carousel.html17
-rw-r--r--docs/_includes/js/collapse.html16
-rw-r--r--docs/_includes/js/dropdowns.html59
-rw-r--r--docs/_includes/js/modal.html8
-rw-r--r--docs/_includes/js/overview.html9
-rw-r--r--docs/_includes/js/popovers.html109
-rw-r--r--docs/_includes/js/scrollspy.html2
-rw-r--r--docs/_includes/js/tabs.html54
-rw-r--r--docs/_includes/js/tooltips.html209
12 files changed, 355 insertions, 327 deletions
diff --git a/docs/_includes/js/affix.html b/docs/_includes/js/affix.html
index 4ce51cb34..56168d6a8 100644
--- a/docs/_includes/js/affix.html
+++ b/docs/_includes/js/affix.html
@@ -14,8 +14,8 @@
<p>Here's how the affix plugin works:</p>
<ol>
<li>To start, the plugin adds <code>.affix-top</code> to indicate the element is in its top-most position. At this point no CSS positioning is required.</li>
- <li>Scrolling past the element you want affixed should trigger the actual affixing. This is where <code>.affix</code> replaces <code>.affix-top</code> and sets <code>position: fixed;</code> (provided by Bootstrap's code CSS).</li>
- <li>If a bottom offset is defined, scrolling past that should replace <code>.affix</code> with <code>.affix-bottom</code>. Since offsets are optional, setting one requires you to set the appropriate CSS. In this case, add <code>position: absolute;</code> when necessary. The plugin uses the data attribute or JavaScript option to determine where to position the element from there.</li>
+ <li>Scrolling past the element you want affixed should trigger the actual affixing. This is where <code>.affix</code> replaces <code>.affix-top</code> and sets <code>position: fixed;</code> (provided by Bootstrap's CSS).</li>
+ <li>If a bottom offset is defined, scrolling past it should replace <code>.affix</code> with <code>.affix-bottom</code>. Since offsets are optional, setting one requires you to set the appropriate CSS. In this case, add <code>position: absolute;</code> when necessary. The plugin uses the data attribute or JavaScript option to determine where to position the element from there.</li>
</ol>
<p>Follow the above steps to set your CSS for either of the usage options below.</p>
@@ -31,14 +31,14 @@
<h3>Via JavaScript</h3>
<p>Call the affix plugin via JavaScript:</p>
{% highlight js %}
- $('#my-affix').affix({
- offset: {
- top: 100
- , bottom: function () {
- return (this.bottom = $('.footer').outerHeight(true))
- }
+$('#myAffix').affix({
+ offset: {
+ top: 100,
+ bottom: function () {
+ return (this.bottom = $('.footer').outerHeight(true))
}
- })
+ }
+})
{% endhighlight %}
@@ -75,7 +75,7 @@
<h3>Events</h3>
- <p>Bootstrap's affix class exposes a few events for hooking into affix functionality.</p>
+ <p>Bootstrap's affix plugin exposes a few events for hooking into affix functionality.</p>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
diff --git a/docs/_includes/js/alerts.html b/docs/_includes/js/alerts.html
index 351301533..e9a3120de 100644
--- a/docs/_includes/js/alerts.html
+++ b/docs/_includes/js/alerts.html
@@ -3,15 +3,13 @@
<h2 id="alerts-examples">Example alerts</h2>
<p>Add dismiss functionality to all alert messages with this plugin.</p>
- <div class="bs-example">
- <div class="alert alert-warning fade in" role="alert">
+ <div class="bs-example bs-example-standalone">
+ <div class="alert alert-warning alert-dismissible fade in" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
- </div><!-- /example -->
- <div class="bs-example">
- <div class="alert alert-danger fade in" role="alert">
+ <div class="alert alert-danger alert-dismissible fade in" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4>Oh snap! You got an error!</h4>
<p>Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.</p>
@@ -24,25 +22,29 @@
<h2 id="alerts-usage">Usage</h2>
- <p>Enable dismissal of an alert via JavaScript:</p>
- {% highlight js %}$(".alert").alert(){% endhighlight %}
- <h3>Markup</h3>
- <p>Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert close functionality.</p>
- {% highlight html %}<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>{% endhighlight %}
+ <p>Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert close functionality. Closing an alert removes it from the DOM.</p>
+
+{% highlight html %}
+<button type="button" class="close" data-dismiss="alert">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+</button>
+{% endhighlight %}
+
+ <p>To have your alerts use animation when closing, make sure they have the <code>.fade</code> and <code>.in</code> classes already applied to them.</p>
<h3>Methods</h3>
<h4>$().alert()</h4>
- <p>Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the <code>.fade</code> and <code>.in</code> class already applied to them.</p>
+ <p>Makes an alert listen for click events on descendant elements which have the <code>data-dismiss="alert"</code> attribute. (Not necessary when using the data-api's auto-initialization.)</p>
- <h4>.alert('close')</h4>
- <p>Closes an alert.</p>
- {% highlight js %}$(".alert").alert('close'){% endhighlight %}
+ <h4>$().alert('close')</h4>
+ <p>Closes an alert by removing it from the DOM. If the <code>.fade</code> and <code>.in</code> classes are present on the element, the alert will fade out before it is removed.</p>
<h3>Events</h3>
- <p>Bootstrap's alert class exposes a few events for hooking into alert functionality.</p>
+ <p>Bootstrap's alert plugin exposes a few events for hooking into alert functionality.</p>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
@@ -64,7 +66,7 @@
</table>
</div><!-- /.table-responsive -->
{% highlight js %}
-$('#my-alert').on('closed.bs.alert', function () {
+$('#myAlert').on('closed.bs.alert', function () {
// do something…
})
{% endhighlight %}
diff --git a/docs/_includes/js/buttons.html b/docs/_includes/js/buttons.html
index 154320e48..f07e716c8 100644
--- a/docs/_includes/js/buttons.html
+++ b/docs/_includes/js/buttons.html
@@ -1,161 +1,134 @@
<div class="bs-docs-section">
<h1 id="buttons" class="page-header">Buttons <small>button.js</small></h1>
- <h2 id="buttons-examples">Example uses</h2>
- <p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p>
+ <p class="lead">Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p>
- <h4>Stateful</h4>
+ <div class="bs-callout bs-callout-danger">
+ <h4>Cross-browser compatibility</h4>
+ <p><a href="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>.</p>
+ </div>
+
+ <h2 id="buttons-stateful">Stateful</h2>
<p>Add <code>data-loading-text="Loading..."</code> to use a loading state on a button.</p>
- <div class="bs-example" style="padding-bottom: 24px;">
- <button type="button" id="loading-example-btn" data-loading-text="Loading..." class="btn btn-primary">
+ <div class="bs-callout bs-callout-info">
+ <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. <a href="#buttons-methods">See more on this below in the <code>$().button(string)</code> documentation</a>.</p>
+ </div>
+ <div class="bs-example">
+ <button type="button" id="loading-example-btn" data-loading-text="Loading..." class="btn btn-primary" autocomplete="off">
Loading state
</button>
</div><!-- /example -->
{% highlight html %}
-<button type="button" id="loading-example-btn" data-loading-text="Loading..." class="btn btn-primary">
+<button type="button" id="myButton" data-loading-text="Loading..." class="btn btn-primary" autocomplete="off">
Loading state
</button>
+
<script>
- $('#loading-example-btn').click(function () {
- var btn = $(this)
- btn.button('loading')
- $.ajax(...).always(function () {
- btn.button('reset')
- });
- });
+ $('#myButton').on('click', function () {
+ var $btn = $(this).button('loading')
+ // business logic...
+ $btn.button('reset')
+ })
</script>
{% endhighlight %}
- <h4>Single toggle</h4>
+ <h2 id="buttons-single-toggle">Single toggle</h2>
<p>Add <code>data-toggle="button"</code> to activate toggling on a single button.</p>
- <div class="bs-example" style="padding-bottom: 24px;">
- <button type="button" class="btn btn-primary" data-toggle="button">Single toggle</button>
+ <div class="bs-example">
+ <button type="button" class="btn btn-primary" data-toggle="button" autocomplete="off">
+ Single toggle
+ </button>
</div><!-- /example -->
{% highlight html %}
-<button type="button" class="btn btn-primary" data-toggle="button">Single toggle</button>
+<button type="button" class="btn btn-primary" data-toggle="button" autocomplete="off">
+ Single toggle
+</button>
{% endhighlight %}
- <h4>Checkbox</h4>
- <p>Add <code>data-toggle="buttons"</code> to a group of checkboxes for checkbox style toggling on btn-group.</p>
+ <h2 id="buttons-checkbox-radio">Checkbox / Radio</h2>
+ <p>Add <code>data-toggle="buttons"</code> to a <code>.btn-group</code> containing checkbox or radio inputs to enable toggling in their respective styles.</p>
<div class="bs-callout bs-callout-warning">
- <h4>Pre-checked options need <code>.active</code></h4>
- <p>For pre-checked options, you must add the <code>.active</code> class to the input's <code>label</code> yourself.</p>
+ <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>
+ </div>
+ <div class="bs-callout bs-callout-warning">
+ <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>&lt;input type="reset"&gt;</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>
</div>
- <div class="bs-example" style="padding-bottom: 24px;">
+ <div class="bs-example">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
- <input type="checkbox" checked> Option 1 (pre-checked)
+ <input type="checkbox" checked autocomplete="off"> Checkbox 1 (pre-checked)
</label>
<label class="btn btn-primary">
- <input type="checkbox"> Option 2
+ <input type="checkbox" autocomplete="off"> Checkbox 2
</label>
<label class="btn btn-primary">
- <input type="checkbox"> Option 3
+ <input type="checkbox" autocomplete="off"> Checkbox 3
</label>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
- <input type="checkbox" checked> Option 1 (pre-checked)
+ <input type="checkbox" autocomplete="off" checked> Checkbox 1 (pre-checked)
</label>
<label class="btn btn-primary">
- <input type="checkbox"> Option 2
+ <input type="checkbox" autocomplete="off"> Checkbox 2
</label>
<label class="btn btn-primary">
- <input type="checkbox"> Option 3
+ <input type="checkbox" autocomplete="off"> Checkbox 3
</label>
</div>
{% endhighlight %}
- <h4>Radio</h4>
- <p>Add <code>data-toggle="buttons"</code> to a group of radio inputs for radio style toggling on btn-group.</p>
- <div class="bs-callout bs-callout-warning">
- <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>
- </div>
- <div class="bs-example" style="padding-bottom: 24px;">
+ <div class="bs-example">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
- <input type="radio" name="options" id="option1" checked> Option 1 (preselected)
+ <input type="radio" name="options" id="option1" autocomplete="off" checked> Radio 1 (preselected)
</label>
<label class="btn btn-primary">
- <input type="radio" name="options" id="option2"> Option 2
+ <input type="radio" name="options" id="option2" autocomplete="off"> Radio 2
</label>
<label class="btn btn-primary">
- <input type="radio" name="options" id="option3"> Option 3
+ <input type="radio" name="options" id="option3" autocomplete="off"> Radio 3
</label>
</div>
</div><!-- /example -->
{% highlight html %}
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
- <input type="radio" name="options" id="option1" checked> Option 1 (preselected)
+ <input type="radio" name="options" id="option1" autocomplete="off" checked> Radio 1 (preselected)
</label>
<label class="btn btn-primary">
- <input type="radio" name="options" id="option2"> Option 2
+ <input type="radio" name="options" id="option2" autocomplete="off"> Radio 2
</label>
<label class="btn btn-primary">
- <input type="radio" name="options" id="option3"> Option 3
+ <input type="radio" name="options" id="option3" autocomplete="off"> Radio 3
</label>
</div>
{% endhighlight %}
-
- <h2 id="buttons-usage">Usage</h2>
- <p>Enable buttons via JavaScript:</p>
-{% highlight js %}
-$('.btn').button()
-{% endhighlight %}
-
- <h3>Markup</h3>
- <p>Data attributes are integral to the button plugin. Check out the example code below for the various markup types.</p>
-
- <h3>Options</h3>
- <p><em>None</em></p>
-
- <h3>Methods</h3>
+ <h2 id="buttons-methods">Methods</h2>
<h4>$().button('toggle')</h4>
<p>Toggles push state. Gives the button the appearance that it has been activated.</p>
- <div class="bs-callout bs-callout-info">
- <h4>Auto toggling</h4>
- <p>You can enable auto toggling of a button by using the <code>data-toggle</code> attribute.</p>
- </div>
-{% highlight html %}
-<button type="button" class="btn btn-primary" data-toggle="button">...</button>
-{% endhighlight %}
-
- <h4>$().button('loading')</h4>
- <p>Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute <code>data-loading-text</code>.
- </p>
-{% highlight html %}
-<button id="loading-example-btn" type="button" class="btn btn-primary" data-loading-text="loading stuff...">...</button>
-<script>
- $('#loading-example-btn').click(function () {
- var btn = $(this)
- btn.button('loading')
- $.ajax(...).always(function () {
- btn.button('reset')
- });
- });
-</script>
-{% endhighlight %}
-
- <div class="bs-callout bs-callout-danger">
- <h4>Cross-browser compatibility</h4>
- <p><a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists the disabled state across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.</p>
- </div>
<h4>$().button('reset')</h4>
<p>Resets button state - swaps text to original text.</p>
<h4>$().button(string)</h4>
- <p>Resets button state - swaps text to any data defined text state.</p>
+ <p>Swaps text to any data defined text state.</p>
{% highlight html %}
-<button type="button" class="btn btn-primary" data-complete-text="finished!" >...</button>
+<button type="button" id="myStateButton" data-complete-text="finished!" class="btn btn-primary" autocomplete="off">
+ ...
+</button>
+
<script>
- $('.btn').button('complete')
+ $('#myStateButton').on('click', function () {
+ $(this).button('complete') // button text will be "finished!"
+ })
</script>
{% endhighlight %}
</div>
diff --git a/docs/_includes/js/carousel.html b/docs/_includes/js/carousel.html
index b8a0d1e4b..23f9af97a 100644
--- a/docs/_includes/js/carousel.html
+++ b/docs/_includes/js/carousel.html
@@ -1,8 +1,9 @@
<div class="bs-docs-section">
<h1 id="carousel" class="page-header">Carousel <small>carousel.js</small></h1>
+ <p>A slideshow component for cycling through elemnts, like a carousel. <strong>Nested carousels are not supported.</strong></p>
+
<h2 id="carousel-examples">Examples</h2>
- <p>The slideshow below shows a generic plugin and component for cycling through elements like a carousel.</p>
<div class="bs-example">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
@@ -10,7 +11,7 @@
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
- <div class="carousel-inner">
+ <div class="carousel-inner" role="listbox">
<div class="item active">
<img data-src="holder.js/900x500/auto/#777:#555/text:First slide" alt="First slide">
</div>
@@ -23,9 +24,11 @@
</div>
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
+ <span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
+ <span class="sr-only">Next</span>
</a>
</div>
</div><!-- /example -->
@@ -39,7 +42,7 @@
</ol>
<!-- Wrapper for slides -->
- <div class="carousel-inner">
+ <div class="carousel-inner" role="listbox">
<div class="item active">
<img src="..." alt="...">
<div class="carousel-caption">
@@ -58,9 +61,11 @@
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
+ <span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
+ <span class="sr-only">Next</span>
</a>
</div>
{% endhighlight %}
@@ -79,7 +84,7 @@
<li data-target="#carousel-example-captions" data-slide-to="1"></li>
<li data-target="#carousel-example-captions" data-slide-to="2"></li>
</ol>
- <div class="carousel-inner">
+ <div class="carousel-inner" role="listbox">
<div class="item active">
<img data-src="holder.js/900x500/auto/#777:#777" alt="First slide image">
<div class="carousel-caption">
@@ -104,9 +109,11 @@
</div>
<a class="left carousel-control" href="#carousel-example-captions" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
+ <span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-captions" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
+ <span class="sr-only">Next</span>
</a>
</div>
</div><!-- /example -->
@@ -132,7 +139,7 @@
<h3>Via data attributes</h3>
<p>Use data attributes to easily control the position of the carousel. <code>data-slide</code> accepts the keywords <code>prev</code> or <code>next</code>, which alters the slide position relative to its current position. Alternatively, use <code>data-slide-to</code> to pass a raw slide index to the carousel <code>data-slide-to="2"</code>, which shifts the slide position to a particular index beginning with <code>0</code>.</p>
- <p>The <code>data-ride="carousel"</code> attribute is used to mark a carousel as animating starting at page load.</p>
+ <p>The <code>data-ride="carousel"</code> attribute is used to mark a carousel as animating starting at page load. <strong class="text-danger">It cannot be used in combination with (redundant and unnecessary) explicit JavaScript initialization of the same carousel.</strong></p>
<h3>Via JavaScript</h3>
<p>Call carousel manually with:</p>
diff --git a/docs/_includes/js/collapse.html b/docs/_includes/js/collapse.html
index e878cdb09..4e7fb450a 100644
--- a/docs/_includes/js/collapse.html
+++ b/docs/_includes/js/collapse.html
@@ -13,7 +13,7 @@
<p>Using the collapse plugin, we built a simple accordion by extending the panel component.</p>
<div class="bs-example">
- <div class="panel-group" id="accordion">
+ <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
@@ -22,7 +22,7 @@
</a>
</h4>
</div>
- <div id="collapseOne" class="panel-collapse collapse in">
+ <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel">
<div class="panel-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
@@ -36,7 +36,7 @@
</a>
</h4>
</div>
- <div id="collapseTwo" class="panel-collapse collapse">
+ <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel">
<div class="panel-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
@@ -50,7 +50,7 @@
</a>
</h4>
</div>
- <div id="collapseThree" class="panel-collapse collapse">
+ <div id="collapseThree" class="panel-collapse collapse" role="tabpanel">
<div class="panel-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
@@ -59,7 +59,7 @@
</div>
</div><!-- /example -->
{% highlight html %}
-<div class="panel-group" id="accordion">
+<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
@@ -68,7 +68,7 @@
</a>
</h4>
</div>
- <div id="collapseOne" class="panel-collapse collapse in">
+ <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel">
<div class="panel-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
@@ -82,7 +82,7 @@
</a>
</h4>
</div>
- <div id="collapseTwo" class="panel-collapse collapse">
+ <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel">
<div class="panel-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
@@ -96,7 +96,7 @@
</a>
</h4>
</div>
- <div id="collapseThree" class="panel-collapse collapse">
+ <div id="collapseThree" class="panel-collapse collapse" role="tabpanel">
<div class="panel-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
diff --git a/docs/_includes/js/dropdowns.html b/docs/_includes/js/dropdowns.html
index 27b06fe95..6e4710155 100644
--- a/docs/_includes/js/dropdowns.html
+++ b/docs/_includes/js/dropdowns.html
@@ -9,7 +9,7 @@
<nav id="navbar-example" class="navbar navbar-default navbar-static" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
- <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-example-js-navbar-collapse">
+ <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".bs-example-js-navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
@@ -20,7 +20,10 @@
<div class="collapse navbar-collapse bs-example-js-navbar-collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
- <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
+ <a id="drop1" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Dropdown
+ <span class="caret"></span>
+ </a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
@@ -30,7 +33,10 @@
</ul>
</li>
<li class="dropdown">
- <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2 <span class="caret"></span></a>
+ <a id="drop2" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Dropdown
+ <span class="caret"></span>
+ </a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
@@ -42,7 +48,10 @@
</ul>
<ul class="nav navbar-nav navbar-right">
<li id="fat-menu" class="dropdown">
- <a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 3 <span class="caret"></span></a>
+ <a id="drop3" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Dropdown
+ <span class="caret"></span>
+ </a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
@@ -59,10 +68,13 @@
<h3>Within pills</h3>
<div class="bs-example">
- <ul class="nav nav-pills">
- <li class="active"><a href="#">Regular link</a></li>
- <li class="dropdown">
- <a id="drop4" role="button" data-toggle="dropdown" href="#">Dropdown <span class="caret"></span></a>
+ <ul class="nav nav-pills" role="tablist">
+ <li role="presentation" class="active"><a href="#">Regular link</a></li>
+ <li role="presentation" class="dropdown">
+ <a id="drop4" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Dropdown
+ <span class="caret"></span>
+ </a>
<ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
@@ -71,8 +83,11 @@
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
- <li class="dropdown">
- <a id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 2 <span class="caret"></span></a>
+ <li role="presentation" class="dropdown">
+ <a id="drop5" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Dropdown
+ <span class="caret"></span>
+ </a>
<ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
@@ -81,8 +96,11 @@
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
- <li class="dropdown">
- <a id="drop6" role="button" data-toggle="dropdown" href="#">Dropdown 3 <span class="caret"></span></a>
+ <li role="presentation" class="dropdown">
+ <a id="drop6" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Dropdown
+ <span class="caret"></span>
+ </a>
<ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop6">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
@@ -96,26 +114,31 @@
<h2 id="dropdowns-usage">Usage</h2>
- <p>Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the <code>.open</code> class on the parent list item. When opened, the plugin also adds <code>.dropdown-backdrop</code> as a click area for closing dropdown menus when clicking outside the menu. Note: The <code>data-toggle=dropdown</code> attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it.</p>
+ <p>Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the <code>.open</code> class on the parent list item.</p>
+ <p>On mobile devices, opening a dropdown adds a <code>.dropdown-backdrop</code> as a tap area for closing dropdown menus when tapping outside the menu, a requirement for proper iOS support. <strong class="text-danger">This means that switching from an open dropdown menu to a different dropdown menu requires an extra tap on mobile.</strong></p>
+ <p>Note: The <code>data-toggle="dropdown"</code> attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it.</p>
<h3>Via data attributes</h3>
<p>Add <code>data-toggle="dropdown"</code> to a link or button to toggle a dropdown.</p>
{% highlight html %}
<div class="dropdown">
- <a data-toggle="dropdown" href="#">Dropdown trigger</a>
+ <button id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Dropdown trigger
+ <span class="caret"></span>
+ </button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
...
</ul>
</div>
{% endhighlight %}
- <p>To keep URLs intact, use the <code>data-target</code> attribute instead of <code>href="#"</code>.</p>
+ <p>To keep URLs intact with link buttons, use the <code>data-target</code> attribute instead of <code>href="#"</code>.</p>
{% highlight html %}
<div class="dropdown">
- <a id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="/page.html">
- Dropdown <span class="caret"></span>
+ <a id="dLabel" data-target="#" href="http://example.com" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Dropdown trigger
+ <span class="caret"></span>
</a>
-
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
...
</ul>
diff --git a/docs/_includes/js/modal.html b/docs/_includes/js/modal.html
index c1cc6f055..d5b1aee84 100644
--- a/docs/_includes/js/modal.html
+++ b/docs/_includes/js/modal.html
@@ -67,7 +67,7 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
- <h4 class="modal-title" id="myModalLabel">Modal Heading</h4>
+ <h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
<h4>Text in a modal</h4>
@@ -259,7 +259,9 @@
<td>remote</td>
<td>path</td>
<td>false</td>
- <td><p>If a remote URL is provided, <strong>content will be loaded one time</strong> via jQuery's <code>load</code> method and injected into the <code>.modal-content</code> div. If you're using the data-api, you may alternatively use the <code>href</code> attribute to specify the remote source. An example of this is shown below:</p>
+ <td>
+ <p><span class="text-danger">This option is deprecated since v3.2.1 and will be removed in v4.</span> We recommend instead using client-side templating or a data binding framework, or calling <a href="http://api.jquery.com/load/">jQuery.load</a> yourself.</p>
+ <p>If a remote URL is provided, <strong>content will be loaded one time</strong> via jQuery's <code>load</code> method and injected into the <code>.modal-content</code> div. If you're using the data-api, you may alternatively use the <code>href</code> attribute to specify the remote source. An example of this is shown below:</p>
{% highlight html %}
<a data-toggle="modal" href="remote.html" data-target="#modal">Click me</a>
{% endhighlight %}
@@ -320,7 +322,7 @@ $('#myModal').modal({
</tr>
<tr>
<td>loaded.bs.modal</td>
- <td>This event is fired when the modal has loaded content using the remote option.</td>
+ <td>This event is fired when the modal has loaded content using the <code>remote</code> option.</td>
</tr>
</tbody>
</table>
diff --git a/docs/_includes/js/overview.html b/docs/_includes/js/overview.html
index 2ef8fe850..2a3c41a8b 100644
--- a/docs/_includes/js/overview.html
+++ b/docs/_includes/js/overview.html
@@ -47,6 +47,12 @@ $('#myModal').modal('show') // initializes and invokes show immed
<p>Each plugin also exposes its raw constructor on a <code>Constructor</code> property: <code>$.fn.popover.Constructor</code>. If you'd like to get a particular plugin instance, retrieve it directly from an element: <code>$('[rel="popover"]').data('popover')</code>.</p>
+ <h4>Default settings</h4>
+ <p>You can change the default settings for a plugin by modifying the plugin's <code>Constructor.DEFAULTS</code> object:<p>
+{% highlight js %}
+$.fn.modal.Constructor.DEFAULTS.keyboard = false // changes default for the modal plugin's `keyboard` option to false
+{% endhighlight %}
+
<h3 id="js-noconflict">No conflict</h3>
<p>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 <code>.noConflict</code> on the plugin you wish to revert the value of.</p>
{% highlight js %}
@@ -64,6 +70,9 @@ $('#myModal').on('show.bs.modal', function (e) {
})
{% endhighlight %}
+ <h3 id="js-disabled">No special fallbacks when JavaScript is disabled</h3>
+ <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 <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript"><code>&lt;noscript&gt;</code></a> to explain the situation (and how to re-enable JavaScript) to your users, and/or add your own custom fallbacks.</p>
+
<div class="bs-callout bs-callout-warning" id="callout-third-party-libs">
<h4>Third-party libraries</h4>
<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>
diff --git a/docs/_includes/js/popovers.html b/docs/_includes/js/popovers.html
index 2ee670741..108b51205 100644
--- a/docs/_includes/js/popovers.html
+++ b/docs/_includes/js/popovers.html
@@ -3,6 +3,7 @@
<h2 id="popovers-examples">Examples</h2>
<p>Add small overlays of content, like those on the iPad, to any element for housing secondary information.</p>
+ <p>Popovers whose both title and content are zero-length are never displayed.</p>
<div class="bs-callout bs-callout-danger">
<h4>Plugin dependency</h4>
@@ -24,6 +25,10 @@
<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>&lt;div&gt;</code> and apply the popover to that <code>&lt;div&gt;</code> instead.</p>
</div>
+ <div class="bs-callout bs-callout-info">
+ <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>
+ </div>
<h3>Static popover</h3>
<p>Four options are available: top, right, bottom, and left aligned.</p>
@@ -73,8 +78,8 @@
{% endhighlight %}
<h4>Four directions</h4>
- <div class="bs-example tooltip-demo">
- <div class="bs-example-tooltips">
+ <div class="bs-example popover-demo">
+ <div class="bs-example-popovers">
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on left
</button>
@@ -109,24 +114,18 @@ sagittis lacus vel augue laoreet rutrum faucibus.">
{% endhighlight %}
<h4>Dismiss on next click</h4>
- <p>Use the <code>focus</code> trigger to dismiss popovers on their next click.</p>
+ <p>Use the <code>focus</code> trigger to dismiss popovers on the next click that the user makes.</p>
+ <div class="bs-callout bs-callout-danger">
+ <h4>Specific markup required for dismiss-on-next-click</h4>
+ <p>For proper cross-browser and cross-platform behavior, you must use the <code>&lt;a&gt;</code> tag, <i>not</i> the <code>&lt;button&gt;</code> tag, and you also must include a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#tabindex"><code>tabindex</code></a> attribute.</p>
+ </div>
<div class="bs-example" style="padding-bottom: 24px;">
- <button type="button" class="btn btn-lg btn-danger bs-docs-popover-dismiss" data-toggle="popover" title="Dimissmisable popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissable popover</button>
+ <a href="#" tabindex="0" class="btn btn-lg btn-danger bs-docs-popover" 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>
</div>
{% highlight html %}
-<button type="button" class="btn btn-lg btn-danger popover-dismiss" data-toggle="popover" title="Dimissmisable popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissable popover</button>
-{% endhighlight %}
-{% highlight js %}
-$('.popover-dismiss').popover({
- trigger: 'focus'
-})
+<a href="#" tabindex="0" class="btn btn-lg btn-danger" 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>
{% endhighlight %}
- <div class="bs-callout bs-callout-warning">
- <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>
- </div>
-
<h2 id="popovers-usage">Usage</h2>
<p>Enable popovers via JavaScript:</p>
@@ -156,7 +155,7 @@ $('.popover-dismiss').popover({
<td>string | false</td>
<td>false</td>
<td>
- <p>Appends the popover to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize.</p>
+ <p>Appends the popover to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize.</p>
</td>
</tr>
<tr>
@@ -165,7 +164,7 @@ $('.popover-dismiss').popover({
<td>''</td>
<td>
<p>Default content value if <code>data-content</code> attribute isn't present.</p>
- <p>If a function is given, it will be called with 1 argument, which is the element that the popover is attached to.</p>
+ <p>If a function is given, it will be called with its <code>this</code> reference set to the element that the popover is attached to.</p>
</td>
</tr>
<tr>
@@ -175,7 +174,7 @@ $('.popover-dismiss').popover({
<td>
<p>Delay showing and hiding the popover (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p>
- <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
+ <p>Object structure is: <code>delay: { "show": 500, "hide": 100 }</code></p>
</td>
</tr>
<tr>
@@ -188,31 +187,37 @@ $('.popover-dismiss').popover({
<td>placement</td>
<td>string | function</td>
<td>'right'</td>
- <td>How to position the popover - top | bottom | left | right | auto.<br> When "auto" is specified, it will dynamically reorient the popover. For example, if placement is "auto left", the popover will display to the left when possible, otherwise it will display right.</td>
+ <td>
+ <p>How to position the popover - top | bottom | left | right | auto.<br>When "auto" is specified, it will dynamically reorient the popover. For example, if placement is "auto left", the popover will display to the left when possible, otherwise it will display right.</p>
+ <p>When a function is used to determine the placement, it is called with the popover DOM node as its first argument and the triggering element DOM node as its second. The <code>this</code> context is set to the popover instance.</p>
+ </td>
</tr>
<tr>
<td>selector</td>
<td>string</td>
<td>false</td>
- <td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsfiddle.net/fScua/">an informative example</a>.</td>
+ <td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsbin.com/zopod/1/edit">an informative example</a>.</td>
</tr>
<tr>
<td>template</td>
<td>string</td>
<td><code>'&lt;div class="popover" role="tooltip"&gt;&lt;div class="arrow"&gt;&lt;/div&gt;&lt;h3 class="popover-title"&gt;&lt;/h3&gt;&lt;div class="popover-content"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
<td>
- <p>Base HTML to use when creating the popover.</p>
- <p>The popover's <code>title</code> will be injected into the <code>.popover-title</code>.</p>
- <p>The popover's <code>content</code> will be injected into the <code>.popover-content</code>.</p>
- <p><code>.arrow</code> will become the popover's arrow.</p>
- <p>The outermost wrapper element should have the <code>.popover</code> class.</p>
+ <p>Base HTML to use when creating the popover.</p>
+ <p>The popover's <code>title</code> will be injected into the <code>.popover-title</code>.</p>
+ <p>The popover's <code>content</code> will be injected into the <code>.popover-content</code>.</p>
+ <p><code>.arrow</code> will become the popover's arrow.</p>
+ <p>The outermost wrapper element should have the <code>.popover</code> class.</p>
</td>
</tr>
<tr>
<td>title</td>
<td>string | function</td>
<td>''</td>
- <td>Default title value if <code>title</code> attribute isn't present</td>
+ <td>
+ <p>Default title value if <code>title</code> attribute isn't present.</p>
+ <p>If a function is given, it will be called with its <code>this</code> reference set to the element that the popover is attached to.</p>
+ </td>
</tr>
<tr>
<td>trigger</td>
@@ -221,12 +226,12 @@ $('.popover-dismiss').popover({
<td>How popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td>
</tr>
<tr>
- <td>viewport</td>
- <td>string | object</td>
- <td>{ selector: 'body', padding: 0 }</td>
- <td>
- <p>Keeps the popover within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ selector: '#viewport', padding: 0 }</code></p>
- </td>
+ <td>viewport</td>
+ <td>string | object</td>
+ <td>{ selector: 'body', padding: 0 }</td>
+ <td>
+ <p>Keeps the popover within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ "selector": "#viewport", "padding": 0 }</code></p>
+ </td>
</tr>
</tbody>
</table>
@@ -259,28 +264,28 @@ $('.popover-dismiss').popover({
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
- <tr>
- <th style="width: 150px;">Event Type</th>
- <th>Description</th>
- </tr>
+ <tr>
+ <th style="width: 150px;">Event Type</th>
+ <th>Description</th>
+ </tr>
</thead>
<tbody>
- <tr>
- <td>show.bs.popover</td>
- <td>This event fires immediately when the <code>show</code> instance method is called.</td>
- </tr>
- <tr>
- <td>shown.bs.popover</td>
- <td>This event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete).</td>
- </tr>
- <tr>
- <td>hide.bs.popover</td>
- <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
- </tr>
- <tr>
- <td>hidden.bs.popover</td>
- <td>This event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete).</td>
- </tr>
+ <tr>
+ <td>show.bs.popover</td>
+ <td>This event fires immediately when the <code>show</code> instance method is called.</td>
+ </tr>
+ <tr>
+ <td>shown.bs.popover</td>
+ <td>This event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete).</td>
+ </tr>
+ <tr>
+ <td>hide.bs.popover</td>
+ <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
+ </tr>
+ <tr>
+ <td>hidden.bs.popover</td>
+ <td>This event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete).</td>
+ </tr>
</tbody>
</table>
</div><!-- /.table-responsive -->
diff --git a/docs/_includes/js/scrollspy.html b/docs/_includes/js/scrollspy.html
index 2ceedb0ca..c68ec32a4 100644
--- a/docs/_includes/js/scrollspy.html
+++ b/docs/_includes/js/scrollspy.html
@@ -7,7 +7,7 @@
<nav id="navbar-example2" class="navbar navbar-default navbar-static" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
- <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-example-js-navbar-scrollspy">
+ <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".bs-example-js-navbar-scrollspy">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
diff --git a/docs/_includes/js/tabs.html b/docs/_includes/js/tabs.html
index 38518f0b1..39c244e8e 100644
--- a/docs/_includes/js/tabs.html
+++ b/docs/_includes/js/tabs.html
@@ -5,9 +5,9 @@
<p>Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.</p>
<div class="bs-example bs-example-tabs">
<ul id="myTab" class="nav nav-tabs" role="tablist">
- <li class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
- <li><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
- <li class="dropdown">
+ <li role="presentation" class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
+ <li role="presentation"><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
+ <li role="presentation" class="dropdown">
<a href="#" id="myTabDrop1" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop1">
<li><a href="#dropdown1" tabindex="-1" role="tab" data-toggle="tab">@fat</a></li>
@@ -16,16 +16,16 @@
</li>
</ul>
<div id="myTabContent" class="tab-content">
- <div class="tab-pane fade in active" id="home">
+ <div role="tabpanel" class="tab-pane fade in active" id="home">
<p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
</div>
- <div class="tab-pane fade" id="profile">
+ <div role="tabpanel" class="tab-pane fade" id="profile">
<p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
</div>
- <div class="tab-pane fade" id="dropdown1">
+ <div role="tabpanel" class="tab-pane fade" id="dropdown1">
<p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
</div>
- <div class="tab-pane fade" id="dropdown2">
+ <div role="tabpanel" class="tab-pane fade" id="dropdown2">
<p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
</div>
</div>
@@ -61,18 +61,18 @@ $('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
{% highlight html %}
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
- <li class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
- <li><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
- <li><a href="#messages" role="tab" data-toggle="tab">Messages</a></li>
- <li><a href="#settings" role="tab" data-toggle="tab">Settings</a></li>
+ <li role="presentation" class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
+ <li role="presentation"><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
+ <li role="presentation"><a href="#messages" role="tab" data-toggle="tab">Messages</a></li>
+ <li role="presentation"><a href="#settings" role="tab" data-toggle="tab">Settings</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
- <div class="tab-pane active" id="home">...</div>
- <div class="tab-pane" id="profile">...</div>
- <div class="tab-pane" id="messages">...</div>
- <div class="tab-pane" id="settings">...</div>
+ <div role="tabpanel" class="tab-pane active" id="home">...</div>
+ <div role="tabpanel" class="tab-pane" id="profile">...</div>
+ <div role="tabpanel" class="tab-pane" id="messages">...</div>
+ <div role="tabpanel" class="tab-pane" id="settings">...</div>
</div>
{% endhighlight %}
@@ -80,10 +80,10 @@ $('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
<p>To make tabs fade in, add <code>.fade</code> to each <code>.tab-pane</code>. The first tab pane must also have <code>.in</code> to properly fade in initial content.</p>
{% highlight html %}
<div class="tab-content">
- <div class="tab-pane fade in active" id="home">...</div>
- <div class="tab-pane fade" id="profile">...</div>
- <div class="tab-pane fade" id="messages">...</div>
- <div class="tab-pane fade" id="settings">...</div>
+ <div role="tabpanel" class="tab-pane fade in active" id="home">...</div>
+ <div role="tabpanel" class="tab-pane fade" id="profile">...</div>
+ <div role="tabpanel" class="tab-pane fade" id="messages">...</div>
+ <div role="tabpanel" class="tab-pane fade" id="settings">...</div>
</div>
{% endhighlight %}
@@ -94,17 +94,17 @@ $('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
</p>
{% highlight html %}
<ul class="nav nav-tabs" role="tablist" id="myTab">
- <li class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
- <li><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
- <li><a href="#messages" role="tab" data-toggle="tab">Messages</a></li>
- <li><a href="#settings" role="tab" data-toggle="tab">Settings</a></li>
+ <li role="presentation" class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
+ <li role="presentation"><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
+ <li role="presentation"><a href="#messages" role="tab" data-toggle="tab">Messages</a></li>
+ <li role="presentation"><a href="#settings" role="tab" data-toggle="tab">Settings</a></li>
</ul>
<div class="tab-content">
- <div class="tab-pane active" id="home">...</div>
- <div class="tab-pane" id="profile">...</div>
- <div class="tab-pane" id="messages">...</div>
- <div class="tab-pane" id="settings">...</div>
+ <div role="tabpanel" class="tab-pane active" id="home">...</div>
+ <div role="tabpanel" class="tab-pane" id="profile">...</div>
+ <div role="tabpanel" class="tab-pane" id="messages">...</div>
+ <div role="tabpanel" class="tab-pane" id="settings">...</div>
</div>
<script>
diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html
index 5a43c1ddd..127e10155 100644
--- a/docs/_includes/js/tooltips.html
+++ b/docs/_includes/js/tooltips.html
@@ -1,8 +1,9 @@
<div class="bs-docs-section">
<h1 id="tooltips" class="page-header">Tooltips <small>tooltip.js</small></h1>
+ <p>Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.</p>
+ <p>Tooltips with zero-length titles are never displayed.</p>
<h2 id="tooltips-examples">Examples</h2>
- <p>Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.</p>
<p>Hover over the links below to see tooltips:</p>
<div class="bs-example tooltip-demo">
<p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" 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 <a href="#" 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 <a href="#" data-toggle="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
@@ -58,7 +59,7 @@ $('#example').tooltip(options)
<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>
</div>
-{% highlight html linenos %}
+{% highlight html %}
<!-- HTML to write -->
<a href="#" data-toggle="tooltip" title="Some tooltip text!">Hover over me</a>
@@ -76,87 +77,93 @@ $('#example').tooltip(options)
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
- <tr>
- <th style="width: 100px;">Name</th>
- <th style="width: 100px;">Type</th>
- <th style="width: 50px;">Default</th>
- <th>Description</th>
- </tr>
+ <tr>
+ <th style="width: 100px;">Name</th>
+ <th style="width: 100px;">Type</th>
+ <th style="width: 50px;">Default</th>
+ <th>Description</th>
+ </tr>
</thead>
<tbody>
- <tr>
- <td>animation</td>
- <td>boolean</td>
- <td>true</td>
- <td>Apply a CSS fade transition to the tooltip</td>
- </tr>
- <tr>
- <td>container</td>
- <td>string | false</td>
- <td>false</td>
- <td>
- <p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize.</p>
- </td>
- </tr>
- <tr>
- <td>delay</td>
- <td>number | object</td>
- <td>0</td>
- <td>
- <p>Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p>
- <p>If a number is supplied, delay is applied to both hide/show</p>
- <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
- </td>
- </tr>
- <tr>
- <td>html</td>
- <td>boolean</td>
- <td>false</td>
- <td>Insert HTML into the tooltip. If false, jQuery's <code>text</code> method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.</td>
- </tr>
- <tr>
- <td>placement</td>
- <td>string | function</td>
- <td>'top'</td>
- <td>How to position the tooltip - top | bottom | left | right | auto. <br> When "auto" is specified, it will dynamically reorient the tooltip. For example, if placement is "auto left", the tooltip will display to the left when possible, otherwise it will display right.</td>
- </tr>
- <tr>
- <td>selector</td>
- <td>string</td>
- <td>false</td>
- <td>If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have tooltips added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsfiddle.net/fScua/">an informative example</a>.</td>
- </tr>
- <tr>
- <td>template</td>
- <td>string</td>
- <td><code>'&lt;div class="tooltip" role="tooltip"&gt;&lt;div class="tooltip-arrow"&gt;&lt;/div&gt;&lt;div class="tooltip-inner"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
- <td>
- <p>Base HTML to use when creating the tooltip.</p>
- <p>The tooltip's <code>title</code> will be injected into the <code>.tooltip-inner</code>.</p>
- <p><code>.tooltip-arrow</code> will become the tooltip's arrow.</p>
- <p>The outermost wrapper element should have the <code>.tooltip</code> class.</p>
- </td>
- </tr>
- <tr>
- <td>title</td>
- <td>string | function</td>
- <td>''</td>
- <td>Default title value if <code>title</code> attribute isn't present</td>
- </tr>
- <tr>
- <td>trigger</td>
- <td>string</td>
- <td>'hover focus'</td>
- <td>How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td>
- </tr>
- <tr>
- <td>viewport</td>
- <td>string | object</td>
- <td>{ selector: 'body', padding: 0 }</td>
- <td>
- <p>Keeps the tooltip within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ selector: '#viewport', padding: 0 }</code></p>
- </td>
- </tr>
+ <tr>
+ <td>animation</td>
+ <td>boolean</td>
+ <td>true</td>
+ <td>Apply a CSS fade transition to the tooltip</td>
+ </tr>
+ <tr>
+ <td>container</td>
+ <td>string | false</td>
+ <td>false</td>
+ <td>
+ <p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>delay</td>
+ <td>number | object</td>
+ <td>0</td>
+ <td>
+ <p>Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p>
+ <p>If a number is supplied, delay is applied to both hide/show</p>
+ <p>Object structure is: <code>delay: { "show": 500, "hide": 100 }</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>html</td>
+ <td>boolean</td>
+ <td>false</td>
+ <td>Insert HTML into the tooltip. If false, jQuery's <code>text</code> method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.</td>
+ </tr>
+ <tr>
+ <td>placement</td>
+ <td>string | function</td>
+ <td>'top'</td>
+ <td>
+ <p>How to position the tooltip - top | bottom | left | right | auto.<br>When "auto" is specified, it will dynamically reorient the tooltip. For example, if placement is "auto left", the tooltip will display to the left when possible, otherwise it will display right.</p>
+ <p>When a function is used to determine the placement, it is called with the tooltip DOM node as its first argument and the triggering element DOM node as its second. The <code>this</code> context is set to the tooltip instance.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>selector</td>
+ <td>string</td>
+ <td>false</td>
+ <td>If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have tooltips added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsbin.com/zopod/1/edit">an informative example</a>.</td>
+ </tr>
+ <tr>
+ <td>template</td>
+ <td>string</td>
+ <td><code>'&lt;div class="tooltip" role="tooltip"&gt;&lt;div class="tooltip-arrow"&gt;&lt;/div&gt;&lt;div class="tooltip-inner"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
+ <td>
+ <p>Base HTML to use when creating the tooltip.</p>
+ <p>The tooltip's <code>title</code> will be injected into the <code>.tooltip-inner</code>.</p>
+ <p><code>.tooltip-arrow</code> will become the tooltip's arrow.</p>
+ <p>The outermost wrapper element should have the <code>.tooltip</code> class.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>title</td>
+ <td>string | function</td>
+ <td>''</td>
+ <td>
+ <p>Default title value if <code>title</code> attribute isn't present.</p>
+ <p>If a function is given, it will be called with its <code>this</code> reference set to the element that the tooltip is attached to.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>trigger</td>
+ <td>string</td>
+ <td>'hover focus'</td>
+ <td>How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td>
+ </tr>
+ <tr>
+ <td>viewport</td>
+ <td>string | object</td>
+ <td>{ selector: 'body', padding: 0 }</td>
+ <td>
+ <p>Keeps the tooltip within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ "selector": "#viewport", "padding": 0 }</code></p>
+ </td>
+ </tr>
</tbody>
</table>
</div><!-- /.table-responsive -->
@@ -190,28 +197,28 @@ $('#example').tooltip(options)
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
- <tr>
- <th style="width: 150px;">Event Type</th>
- <th>Description</th>
- </tr>
+ <tr>
+ <th style="width: 150px;">Event Type</th>
+ <th>Description</th>
+ </tr>
</thead>
<tbody>
- <tr>
- <td>show.bs.tooltip</td>
- <td>This event fires immediately when the <code>show</code> instance method is called.</td>
- </tr>
- <tr>
- <td>shown.bs.tooltip</td>
- <td>This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).</td>
- </tr>
- <tr>
- <td>hide.bs.tooltip</td>
- <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
- </tr>
- <tr>
- <td>hidden.bs.tooltip</td>
- <td>This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).</td>
- </tr>
+ <tr>
+ <td>show.bs.tooltip</td>
+ <td>This event fires immediately when the <code>show</code> instance method is called.</td>
+ </tr>
+ <tr>
+ <td>shown.bs.tooltip</td>
+ <td>This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).</td>
+ </tr>
+ <tr>
+ <td>hide.bs.tooltip</td>
+ <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
+ </tr>
+ <tr>
+ <td>hidden.bs.tooltip</td>
+ <td>This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).</td>
+ </tr>
</tbody>
</table>
</div><!-- /.table-responsive -->