From 6d447079a41f8441c061a9d6f572e28c627ccd6e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 6 Jul 2012 15:18:56 -0700 Subject: update buttons in docs to include type --- docs/javascript.html | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'docs/javascript.html') diff --git a/docs/javascript.html b/docs/javascript.html index 7fb1448ec..1679c0e7f 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -1086,37 +1086,37 @@ $('#my-alert').bind('closed', function () {

Stateful

Add data-loading-text="Loading..." to use a loading state on a button.

-
-<button class="btn btn-primary" data-loading-text="Loading...">Loading state</button>
+<button type="button" class="btn btn-primary" data-loading-text="Loading...">Loading state</button>
 

Single toggle

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

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

Checkbox

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

- - - + + +
 <div class="btn-group" data-toggle="buttons-checkbox">
-  <button class="btn">Left</button>
-  <button class="btn">Middle</button>
-  <button class="btn">Right</button>
+  <button type="button" class="btn">Left</button>
+  <button type="button" class="btn">Middle</button>
+  <button type="button" class="btn">Right</button>
 </div>
 
@@ -1124,16 +1124,16 @@ $('#my-alert').bind('closed', function () {

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

- - - + + +
 <div class="btn-group" data-toggle="buttons-radio">
-  <button class="btn">Left</button>
-  <button class="btn">Middle</button>
-  <button class="btn">Right</button>
+  <button type="button" class="btn">Left</button>
+  <button type="button" class="btn">Middle</button>
+  <button type="button" class="btn">Right</button>
 </div>
 
@@ -1158,11 +1158,11 @@ $('#my-alert').bind('closed', function () { Heads up! You can enable auto toggling of a button by using the data-toggle attribute. -
<button class="btn" data-toggle="button" >…</button>
+
<button type="button" class="btn" data-toggle="button" >…</button>

$().button('loading')

Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text.

-
<button class="btn" data-loading-text="loading stuff..." >...</button>
+
<button type="button" class="btn" data-loading-text="loading stuff..." >...</button>
Heads up! Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off". @@ -1171,7 +1171,7 @@ $('#my-alert').bind('closed', function () {

Resets button state - swaps text to original text.

$().button(string)

Resets button state - swaps text to any data defined text state.

-
<button class="btn" data-complete-text="finished!" >...</button>
+
<button type="button" class="btn" data-complete-text="finished!" >...</button>
 <script>
   $('.btn').button('complete')
 </script>
@@ -1234,7 +1234,7 @@ $('#my-alert').bind('closed', function () {
-<button class="btn btn-danger" data-toggle="collapse" data-target="#demo">
+<button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo">
   simple collapsible
 </button>
 
-- 
cgit v1.2.3