From 08fea7587c536b7daa2c976cdb50144379ae2a62 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 27 Jan 2012 23:27:33 -0800 Subject: call attention to notices in js docs more --- docs/javascript.html | 53 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 16 deletions(-) (limited to 'docs/javascript.html') diff --git a/docs/javascript.html b/docs/javascript.html index 53130bd16..0bcbe597c 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -146,7 +146,7 @@ -
+
+
Heads up! All javascript plugins require the latest version of jQuery.
@@ -285,7 +286,9 @@ </div> </div> -

Notice If you want your modal to animate in and out, just add a .fade class to the .modal element (refer to the demo to see this in action).

+
+ Heads up! If you want your modal to animate in and out, just add a .fade class to the .modal element (refer to the demo to see this in action) and include bootstrap-transition.js. +

Methods

.modal(options)

Activates your content as a modal. Accepts an optional options object.

@@ -439,7 +442,9 @@ $('#myModal').on('hidden', function () {
$('.dropdown-toggle').dropdown()

Markup

To quickly add dropdown functionality to any element just add data-toggle="dropdown" and any valid bootstrap dropdown will automatically be activated.

-

Notice For added control and flexibility, optionally specify a data-target="#fat" or href="#fat" - this allows you to target specific dropdowns.

+
+ Heads up! You may optionally target a specific dropdown by using data-target="#fat" or href="#fat". +
 <ul class="nav pills">
@@ -533,7 +538,10 @@ $('#myModal').on('hidden', function () {
           

Markup

To easily add scrollspy behavior to your topbar navigation, just add data-spy="scroll" to the element you want to spy on (most typically this would be the body).

<body data-spy="scroll" >...</body>
-

Notice Navbar anchor tags must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the dom like <div id="home"></div>.

+
+ Heads up! + Navbar links must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the dom like <div id="home"></div>. +

Options

@@ -748,7 +756,10 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
-

Notice Individual tooltip instance options can alternatively be specified through the use of data attributes.

+
+ Heads up! + Options for individual tooltips can alternatively be specified through the use of data attributes. +

Markup

For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.

Methods

@@ -857,7 +868,10 @@ $('a[data-toggle="tab"]').on('shown', function (e) { -

Notice Individual popover instance options can alternatively be specified through the use of data attributes.

+
+ Heads up! + Options for individual popovers can alternatively be specified through the use of data attributes. +

Markup

For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a the selector option. @@ -1030,19 +1044,23 @@ $('#my-alert').bind('closed', function () {

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.

+
+ Heads up! + You can enable auto toggling of a button by using the data-toggle attribute. +
<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>
-

- Notice Firefox persists the disabled state across page loads. A workaround for this is to use: autocomplete="off". More info can be found here. -

-

$().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-loading-text="loading stuff..." >...</button>
+
+ Heads up! + Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off". +
+

$().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')
@@ -1146,7 +1164,10 @@ $('#my-alert').bind('closed', function () {
 </button>
 
 <div id="demo" class="collapse in"> … </div>
-

Notice To add accordion like group management to a collapsible control just add the additional data attribute data-parent="#selector". Refer to the demo below to see this in action.

+
+ Heads up! + To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action. +

Methods

.collapse(options)

Activates your content as a collapsible element. Accepts an optional options object. -- cgit v1.2.3