mirror of
https://github.com/jasny/bootstrap.git
synced 2026-02-06 20:15:05 -05:00
Merge branch 'master' into 3.0.0-wip
Conflicts: docs/assets/css/bootstrap.css docs/assets/js/bootstrap.js docs/css.html docs/templates/pages/base-css.mustache docs/templates/pages/components.mustache docs/templates/pages/javascript.mustache less/breadcrumbs.less less/tables.less less/tests/css-tests.html
This commit is contained in:
8
docs/templates/pages/components.mustache
vendored
8
docs/templates/pages/components.mustache
vendored
@@ -1755,16 +1755,16 @@
|
||||
</div>
|
||||
<pre class="prettyprint linenums">
|
||||
<div class="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<button type="button" class="close" data-dismiss="alert">&times;</button>
|
||||
<strong>Warning!</strong> Best check yo self, you're not looking too good.
|
||||
</div>
|
||||
</pre>
|
||||
|
||||
<h3>Dismiss buttons</h3>
|
||||
<p>Mobile Safari and Mobile Opera browsers, in addition to the <code>data-dismiss="alert"</code> attribute, require an <code>href="#"</code> for the dismissal of alerts when using an <code><a></code> tag.</p>
|
||||
<pre class="prettyprint linenums"><a href="#" class="close" data-dismiss="alert">×</a></pre>
|
||||
<pre class="prettyprint linenums"><a href="#" class="close" data-dismiss="alert">&times;</a></pre>
|
||||
<p>Alternatively, you may use a <code><button></code> element with the data attribute, which we have opted to do for our docs. When using <code><button></code>, you must include <code>type="button"</code> or your forms may not submit.</p>
|
||||
<pre class="prettyprint linenums"><button type="button" class="close" data-dismiss="alert">×</button></pre>
|
||||
<pre class="prettyprint linenums"><button type="button" class="close" data-dismiss="alert">&times;</button></pre>
|
||||
|
||||
<h3>Dismiss alerts via JavaScript</h3>
|
||||
<p>Use the <a href="./javascript.html#alerts">alerts jQuery plugin</a> for quick and easy dismissal of alerts.</p>
|
||||
@@ -1784,7 +1784,7 @@
|
||||
</div>
|
||||
<pre class="prettyprint linenums">
|
||||
<div class="alert alert-block">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<button type="button" class="close" data-dismiss="alert">&times;</button>
|
||||
<h4>Warning!</h4>
|
||||
Best check yo self, you're not...
|
||||
</div>
|
||||
|
||||
18
docs/templates/pages/javascript.mustache
vendored
18
docs/templates/pages/javascript.mustache
vendored
@@ -63,9 +63,17 @@ $("#myModal").modal('show') // initializes and invokes show immed
|
||||
</pre>
|
||||
<p>Each plugin also exposes its raw constructor on a `Constructor` 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>
|
||||
|
||||
<h3>No conflict</h3>
|
||||
<p>Sometimes it's neccessary to use bootstrap plugins with other ui frameworks. In these circumstances, occasionally namespace collisions can occur. If this happens, you may call <code>.noCoflict</code> on the plugin you wish to revert the value of.</p>
|
||||
|
||||
<pre class="prettyprint linenums">
|
||||
var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
|
||||
$.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the bootstrap functionality
|
||||
</pre>
|
||||
|
||||
<h3>Events</h3>
|
||||
<p>Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. <code>show</code>) is triggered at the start of an event, and its past participle form (ex. <code>shown</code>) is trigger on the completion of an action.</p>
|
||||
<p>All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.</p>
|
||||
<p>All infinitive events provide <code>preventDefault</code> functionality. This provides the ability to stop the execution of an action before it starts.</p>
|
||||
<pre class="prettyprint linenums">
|
||||
$('#myModal').on('show', function (e) {
|
||||
if (!data) return e.preventDefault() // stops modal from being shown
|
||||
@@ -1055,7 +1063,7 @@ $('#my-alert').bind('closed', function () {
|
||||
<p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p>
|
||||
|
||||
<h4>Stateful</h4>
|
||||
<p>Add data-loading-text="Loading..." to use a loading state on a button.</p>
|
||||
<p>Add <code>data-loading-text="Loading..."</code> to use a loading state on a button.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<button type="button" id="fat-btn" data-loading-text="loading..." class="btn btn-primary">
|
||||
Loading state
|
||||
@@ -1064,14 +1072,14 @@ $('#my-alert').bind('closed', function () {
|
||||
<pre class="prettyprint linenums"><button type="button" class="btn btn-primary" data-loading-text="Loading...">Loading state</button></pre>
|
||||
|
||||
<h4>Single toggle</h4>
|
||||
<p>Add data-toggle="button" to activate toggling on a single button.</p>
|
||||
<p>Add <code>data-toggle="button"</code> to activate toggling on a single button.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button>
|
||||
</div>{{! /example }}
|
||||
<pre class="prettyprint linenums"><button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button></pre>
|
||||
|
||||
<h4>Checkbox</h4>
|
||||
<p>Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group.</p>
|
||||
<p>Add <code>data-toggle="buttons-checkbox"</code> for checkbox style toggling on btn-group.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<div class="btn-group" data-toggle="buttons-checkbox">
|
||||
<button type="button" class="btn btn-primary">Left</button>
|
||||
@@ -1088,7 +1096,7 @@ $('#my-alert').bind('closed', function () {
|
||||
</pre>
|
||||
|
||||
<h4>Radio</h4>
|
||||
<p>Add data-toggle="buttons-radio" for radio style toggling on btn-group.</p>
|
||||
<p>Add <code>data-toggle="buttons-radio"</code> for radio style toggling on btn-group.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<div class="btn-group" data-toggle="buttons-radio">
|
||||
<button type="button" class="btn btn-primary">Left</button>
|
||||
|
||||
Reference in New Issue
Block a user