From ea50e8aeeed6616a61a7e44d28fe60ced327be0c Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 29 Oct 2011 18:49:35 -0700 Subject: add active class to css for buttons, write new spec for button, "use strict" --- docs/javascript.html | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'docs/javascript.html') diff --git a/docs/javascript.html b/docs/javascript.html index 02c0f6a00..47edf2b75 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -314,7 +314,7 @@ $('#my-modal').bind('hidden', function () { -
@@ -329,10 +329,11 @@ $('#my-modal').bind('hidden', function () {

Using bootstrap-buttons.js

$('.tabs').button()
-

Markup

-

You can leverage bootstraps button toggle helper without writing any javascript by using the data-toggle attribute.

-
<button class="btn" data-toggle="toggle" >...</button>

Methods

+

$().button('toggle')

+

Toggles push state. Gives btn the look that it's been activated.

+

Notice You can enable auto toggling of a button by using the data-toggle attribute.

+
<button class="btn" data-toggle="toggle" >...</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.

@@ -346,7 +347,8 @@ $('#my-modal').bind('hidden', function () { $('.btn').button('complete') </scrip>

Demo

- + +