From e8b66a9626055957a378464e2b9204f156b34c17 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 29 Oct 2011 17:58:58 -0700 Subject: star work on bootstrap-buttons.js --- docs/javascript.html | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'docs/javascript.html') diff --git a/docs/javascript.html b/docs/javascript.html index 3192fa04a..02c0f6a00 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -22,6 +22,7 @@ + @@ -48,6 +49,7 @@
  • Modals
  • Dropdown
  • ScrollSpy
  • +
  • Buttons
  • Tabs
  • Twipsy
  • Popover
  • @@ -312,6 +314,54 @@ $('#my-modal').bind('hidden', function () { + + +
    + +
    +
    +

    This plugin offers additional functionality for managing button state.

    + Download +
    +
    +

    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('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('reset')

    +

    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>
    +<script>
    +  $('.btn').button('complete')
    +</scrip>
    +

    Demo

    + + +
    +
    +
    + + -- cgit v1.2.3