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/templates/pages/javascript.mustache | 53 ++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 16 deletions(-) (limited to 'docs/templates/pages/javascript.mustache') diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index 3c7a3b101..ee70bf21b 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -81,7 +81,7 @@ -
+
+
{{_i}}Heads up!{{/i}} {{_i}}All javascript plugins require the latest version of jQuery.{{/i}}
@@ -220,7 +221,9 @@ </div> </div> -

{{_i}}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).{{/i}}

+
+ {{_i}}Heads up!{{/i}} {{_i}}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.{{/i}} +
Methods{{/i}}

.modal({{_i}}options{{/i}})

{{_i}}Activates your content as a modal. Accepts an optional options object.{{/i}}

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

{{_i}}Markup{{/i}}

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

-

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

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

{{_i}}Markup{{/i}}

{{_i}}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).{{/i}}

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

{{_i}}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>.{{/i}}

+
+ {{_i}}Heads up!{{/i}} + {{_i}}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>.{{/i}} +

{{_i}}Options{{/i}}

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

{{_i}}Notice Individual tooltip instance options can alternatively be specified through the use of data attributes.{{/i}}

+
+ {{_i}}Heads up!{{/i}} + {{_i}}Options for individual tooltips can alternatively be specified through the use of data attributes.{{/i}} +

{{_i}}Markup{{/i}}

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

{{_i}}Methods{{/i}}

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

{{_i}}Notice Individual popover instance options can alternatively be specified through the use of data attributes.{{/i}}

+
+ {{_i}}Heads up!{{/i}} + {{_i}}Options for individual popovers can alternatively be specified through the use of data attributes.{{/i}} +

{{_i}}Markup{{/i}}

{{_i}}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.{{/i}} @@ -965,19 +979,23 @@ $('#my-alert').bind('closed', function () {

{{_i}}Methods{{/i}}

$().button('toggle')

{{_i}}Toggles push state. Gives btn the look that it's been activated.{{/i}}

-

{{_i}}Notice You can enable auto toggling of a button by using the data-toggle attribute.{{/i}}

+
+ {{_i}}Heads up!{{/i}} + {{_i}}You can enable auto toggling of a button by using the data-toggle attribute.{{/i}} +
<button class="btn" data-toggle="button" >…</button>

$().button('loading')

{{_i}}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.{{/i}}

-
<button class="btn" data-loading-text="loading stuff..." >...</button>
-

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

-

$().button('reset')

-

{{_i}}Resets button state - swaps text to original text.{{/i}}

-

$().button(string)

-

{{_i}}Resets button state - swaps text to any data defined text state.{{/i}}

+
<button class="btn" data-loading-text="loading stuff..." >...</button>
+
+ {{_i}}Heads up!{{/i}} + {{_i}}Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off".{{/i}} +
+

$().button('reset')

+

{{_i}}Resets button state - swaps text to original text.{{/i}}

+

$().button(string)

+

{{_i}}Resets button state - swaps text to any data defined text state.{{/i}}

<button class="btn" data-complete-text="finished!" >...</button>
 <script>
   $('.btn').button('complete')
@@ -1081,7 +1099,10 @@ $('#my-alert').bind('closed', function () {
 </button>
 
 <div id="demo" class="collapse in"> … </div>
-

{{_i}}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.{{/i}}

+
+ {{_i}}Heads up!{{/i}} + {{_i}}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.{{/i}} +

{{_i}}Methods{{/i}}

.collapse({{_i}}options{{/i}})

{{_i}}Activates your content as a collapsible element. Accepts an optional options object.{{/i}} -- cgit v1.2.3