javascript.mustache 75.1 KB
Newer Older
Jacob Thornton's avatar
Jacob Thornton committed
1
2
3
      <!-- Masthead
      ================================================== -->
      <header class="jumbotron subhead" id="overview">
4
        <h1>{{_i}}Javascript for Bootstrap{{/i}}</h1>
5
        <p class="lead">{{_i}}Bring Bootstrap's components to life&mdash;now with 12 custom <a href="http://jquery.com/" target="_blank">jQuery</a> plugins.{{/i}}
Mark Otto's avatar
Mark Otto committed
6
        <div class="subnav">
7
          <ul class="nav nav-pills">
8
            <li><a href="#javascript">{{_i}}All plugins{{/i}}</a></li>
9
10
11
12
13
14
15
16
17
18
19
            <li><a href="#modals">{{_i}}Modal{{/i}}</a></li>
            <li><a href="#dropdowns">{{_i}}Dropdown{{/i}}</a></li>
            <li><a href="#scrollspy">{{_i}}Scrollspy{{/i}}</a></li>
            <li><a href="#tabs">{{_i}}Tab{{/i}}</a></li>
            <li><a href="#tooltips">{{_i}}Tooltip{{/i}}</a></li>
            <li><a href="#popovers">{{_i}}Popover{{/i}}</a></li>
            <li><a href="#alerts">{{_i}}Alert{{/i}}</a></li>
            <li><a href="#buttons">{{_i}}Button{{/i}}</a></li>
            <li><a href="#collapse">{{_i}}Collapse{{/i}}</a></li>
            <li><a href="#carousel">{{_i}}Carousel{{/i}}</a></li>
            <li><a href="#typeahead">{{_i}}Typeahead{{/i}}</a></li>
Mark Otto's avatar
Mark Otto committed
20
21
          </ul>
        </div>
Jacob Thornton's avatar
Jacob Thornton committed
22
      </header>
23
24


Jacob Thornton's avatar
Jacob Thornton committed
25
26
27
28
      <!-- Using Javascript w/ Bootstrap
      ================================================== -->
      <section id="javascript">
        <div class="page-header">
29
          <h1>{{_i}}jQuery plugins{{/i}} <small>{{_i}}A dozen Bootstrap plugins to get you started{{/i}}</small></h1>
Jacob Thornton's avatar
Jacob Thornton committed
30
31
32
        </div>
      <div class="row">
        <div class="span3">
33
34
          <h3><a href="./javascript.html#modals">{{_i}}Modals{{/i}}</a></h3>
          <p>{{_i}}A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
35
36
        </div>
        <div class="span3">
37
38
          <h3><a href="./javascript.html#dropdowns">{{_i}}Dropdowns{{/i}}</a></h3>
          <p>{{_i}}Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
39
40
        </div>
        <div class="span3">
41
42
          <h3><a href="./javascript.html#scrollspy">{{_i}}Scrollspy{{/i}}</a></h3>
          <p>{{_i}}Use scrollspy to automatically update the links in your navbar to show the current active link based on scroll position.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
43
44
        </div>
        <div class="span3">
45
46
          <h3><a href="./javascript.html#tabs">{{_i}}Togglable tabs{{/i}}</a></h3>
          <p>{{_i}}Use this plugin to make tabs and pills more useful by allowing them to toggle through tabbable panes of local content.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
47
48
49
50
        </div>
      </div> <!-- /row -->
      <div class="row">
        <div class="span3">
51
52
          <h3><a href="./javascript.html#tooltips">{{_i}}Tooltips{{/i}}</a></h3>
          <p>{{_i}}A new take on the jQuery Tipsy plugin, Tooltips don't rely on images&mdash;they use CSS3 for animations and data-attributes for local title storage.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
53
54
        </div>
        <div class="span3">
55
56
57
          <h3><a href="./javascript.html#popovers">{{_i}}Popovers{{/i}}</a> <small class="muted">*</small></h3>
          <p>{{_i}}Add small overlays of content, like those on the iPad, to any element for housing secondary information.{{/i}}</p>
          <p class="muted"><strong>*</strong> {{_i}}Requires <a href="#tooltips">Tooltips</a> to be included{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
58
59
        </div>
        <div class="span3">
60
61
          <h3><a href="./javascript.html#alerts">{{_i}}Alert messages{{/i}}</a></h3>
          <p>{{_i}}The alert plugin is a tiny class for adding close functionality to alerts.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
62
63
        </div>
        <div class="span3">
64
65
          <h3><a href="./javascript.html#buttons">{{_i}}Buttons{{/i}}</a></h3>
          <p>{{_i}}Do more with buttons. Control button states or create groups of buttons for more components like toolbars.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
66
67
        </div>
      </div> <!-- /row -->
68
      <div class="row" style="margin-bottom: 9px;">
Jacob Thornton's avatar
Jacob Thornton committed
69
        <div class="span3">
70
71
          <h3><a href="./javascript.html#collapse">{{_i}}Collapse{{/i}}</a></h3>
          <p>{{_i}}Get base styles and flexible support for collapsible components like accordions and navigation.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
72
73
        </div>
        <div class="span3">
74
75
          <h3><a href="./javascript.html#carousel">{{_i}}Carousel{{/i}}</a></h3>
          <p>{{_i}}Create a merry-go-round of any content you wish to provide an interactive slideshow of content.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
76
77
        </div>
        <div class="span3">
78
79
          <h3><a href="./javascript.html#typeahead">Typeahead</a></h3>
          <p>{{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
80
81
        </div>
        <div class="span3">
82
83
84
          <h3>{{_i}}Transitions{{/i}} <small class="muted">*</small></h3>
          <p>{{_i}}For simple transition effects, include bootstrap-transition.js once to slide in modals or fade out alerts.{{/i}}</p>
          <p class="muted"><strong>*</strong> {{_i}}Required for animation in plugins{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
85
86
        </div>
      </div> <!-- /row -->
87
      <div class="alert alert-info"><strong>{{_i}}Heads up!{{/i}}</strong> {{_i}}All javascript plugins require the latest version of jQuery.{{/i}}</div>
Jacob Thornton's avatar
Jacob Thornton committed
88
    </section>
89
90
91



Jacob Thornton's avatar
Jacob Thornton committed
92
93
94
95
    <!-- Modal
    ================================================== -->
    <section id="modals">
      <div class="page-header">
96
        <h1>{{_i}}Modals{{/i}} <small>bootstrap-modal.js</small></h1>
Jacob Thornton's avatar
Jacob Thornton committed
97
98
99
      </div>
      <div class="row">
        <div class="span3 columns">
100
101
          <h3>{{_i}}About modals{{/i}}</h3>
          <p>{{_i}}A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.{{/i}}</p>
Mark Otto's avatar
Mark Otto committed
102
          <a href="assets/js/bootstrap-modal.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a>
103
        </div>
Jacob Thornton's avatar
Jacob Thornton committed
104
        <div class="span9 columns">
105
106
          <h2>{{_i}}Static example{{/i}}</h2>
          <p>{{_i}}Below is a statically rendered modal.{{/i}}</p>
107
          <div class="well modal-example" style="background-color: #888; border: none;">
Mark Otto's avatar
Mark Otto committed
108
            <div class="modal" style="position: relative; top: auto; left: auto; margin: 0 auto; z-index: 1; max-width: 100%;">
Jacob Thornton's avatar
Jacob Thornton committed
109
              <div class="modal-header">
110
                <button type="button" class="close" data-dismiss="modal">&times;</button>
111
                <h3>{{_i}}Modal header{{/i}}</h3>
Jacob Thornton's avatar
Jacob Thornton committed
112
113
              </div>
              <div class="modal-body">
114
                <p>{{_i}}One fine body…{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
115
116
              </div>
              <div class="modal-footer">
117
                <a href="#" class="btn">{{_i}}Close{{/i}}</a>
118
                <a href="#" class="btn btn-primary">{{_i}}Save changes{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
119
120
121
              </div>
            </div>
          </div> <!-- /well -->
122

123
124
          <h2>{{_i}}Live demo{{/i}}</h2>
          <p>{{_i}}Toggle a modal via javascript by clicking the button below. It will slide down and fade in from the top of the page.{{/i}}</p>
125

Jacob Thornton's avatar
Jacob Thornton committed
126
          <!-- sample modal content -->
127
          <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModal-label">
Jacob Thornton's avatar
Jacob Thornton committed
128
            <div class="modal-header">
129
              <button type="button" class="close" data-dismiss="modal">&times;</button>
130
              <h3 id="myModal-label">{{_i}}Modal Heading{{/i}}</h3>
Jacob Thornton's avatar
Jacob Thornton committed
131
132
            </div>
            <div class="modal-body">
133
              <h4>{{_i}}Text in a modal{{/i}}</h4>
Jacob Thornton's avatar
Jacob Thornton committed
134
              <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem.</p>
135

136
137
138
139
140
              <form class="well">
                <label>Label name</label>
                <input type="text" class="span3" placeholder="Type something…">
              </form>

141
              <h4>{{_i}}Popover in a modal{{/i}}</h4>
142
              <p>{{_i}}This <a href="#" class="btn popover-test" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">button</a> should trigger a popover on hover.{{/i}}</p>
143

144
145
              <h4>{{_i}}Tooltips in a modal{{/i}}</h4>
              <p>{{_i}}<a href="#" class="tooltip-test" title="Tooltip">This link</a> and <a href="#" class="tooltip-test" title="Tooltip">that link</a> should have tooltips on hover.{{/i}}</p>
146
147
148
149
150
151
152
153
154
155
156

              <hr>

              <h4>{{_i}}Overflowing text to show optional scrollbar{{/i}}</h4>
              <p>{{_i}}We set a fixed <code>max-height</code> on the <code>.modal-body</code>. Watch it overflow with all this extra lorem ipsum text we've included.{{/i}}</p>
              <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
              <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
              <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>
              <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
              <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
              <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>
Jacob Thornton's avatar
Jacob Thornton committed
157
158
            </div>
            <div class="modal-footer">
159
              <a href="#" class="btn" data-dismiss="modal" >{{_i}}Close{{/i}}</a>
160
              <a href="#" class="btn btn-primary">{{_i}}Save changes{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
161
162
            </div>
          </div>
163
          <a data-toggle="modal" href="#myModal" class="btn btn-primary btn-large">{{_i}}Launch demo modal{{/i}}</a>
164

Jacob Thornton's avatar
Jacob Thornton committed
165
          <hr>
166

167
168
          <h2>{{_i}}Using bootstrap-modal{{/i}}</h2>
          <p>{{_i}}Call the modal via javascript:{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
169
          <pre class="prettyprint linenums">$('#myModal').modal(options)</pre>
170
          <h3>{{_i}}Options{{/i}}</h3>
Jacob Thornton's avatar
Jacob Thornton committed
171
172
173
          <table class="table table-bordered table-striped">
            <thead>
             <tr>
174
175
176
177
               <th style="width: 100px;">{{_i}}Name{{/i}}</th>
               <th style="width: 50px;">{{_i}}type{{/i}}</th>
               <th style="width: 50px;">{{_i}}default{{/i}}</th>
               <th>{{_i}}description{{/i}}</th>
Jacob Thornton's avatar
Jacob Thornton committed
178
179
180
181
             </tr>
            </thead>
            <tbody>
             <tr>
182
183
184
               <td>{{_i}}backdrop{{/i}}</td>
               <td>{{_i}}boolean{{/i}}</td>
               <td>{{_i}}true{{/i}}</td>
185
               <td>{{_i}}Includes a modal-backdrop element. Alternatively, specify <code>static</code> for a backdrop which doesn't close the modal on click.{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
186
187
             </tr>
             <tr>
188
189
190
191
               <td>{{_i}}keyboard{{/i}}</td>
               <td>{{_i}}boolean{{/i}}</td>
               <td>{{_i}}true{{/i}}</td>
               <td>{{_i}}Closes the modal when escape key is pressed{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
192
             </tr>
193
194
195
196
197
             <tr>
               <td>{{_i}}show{{/i}}</td>
               <td>{{_i}}boolean{{/i}}</td>
               <td>{{_i}}true{{/i}}</td>
               <td>{{_i}}Shows the modal when initialized.{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
198
199
200
             </tr>
            </tbody>
          </table>
201
202
203
          <h3>{{_i}}Markup{{/i}}</h3>
          <p>{{_i}}You can activate modals on your page easily without having to write a single line of javascript. Just set <code>data-toggle="modal"</code> on a controller element with a <code>data-target="#foo"</code> or <code>href="#foo"</code> which corresponds to a modal element id, and when clicked, it will launch your modal.</p>
          <p>Also, to add options to your modal instance, just include them as additional data attributes on either the control element or the modal markup itself.{{/i}}</p>
204
<pre class="prettyprint linenums">
205
&lt;a class="btn" data-toggle="modal" href="#myModal" &gt;{{_i}}Launch Modal{{/i}}&lt;/a&gt;
206
207
208
</pre>

<pre class="prettyprint linenums">
209
&lt;div class="modal" id="myModal"&gt;
Jacob Thornton's avatar
Jacob Thornton committed
210
  &lt;div class="modal-header"&gt;
211
    &lt;button type="button" class="close" data-dismiss="modal"&gt;&times;&lt;/button&gt;
Jacob Thornton's avatar
Jacob Thornton committed
212
213
214
    &lt;h3&gt;Modal header&lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="modal-body"&gt;
215
    &lt;p&gt;{{_i}}One fine body…{{/i}}&lt;/p&gt;
Jacob Thornton's avatar
Jacob Thornton committed
216
217
  &lt;/div&gt;
  &lt;div class="modal-footer"&gt;
218
    &lt;a href="#" class="btn"&gt;{{_i}}Close{{/i}}&lt;/a&gt;
219
    &lt;a href="#" class="btn btn-primary"&gt;{{_i}}Save changes{{/i}}&lt;/a&gt;
Jacob Thornton's avatar
Jacob Thornton committed
220
  &lt;/div&gt;
221
222
&lt;/div&gt;
</pre>
223
224
225
          <div class="alert alert-info">
            <strong>{{_i}}Heads up!{{/i}}</strong> {{_i}}If you want your modal to animate in and out, just add a <code>.fade</code> class to the <code>.modal</code> element (refer to the demo to see this in action) and include bootstrap-transition.js.{{/i}}
          </div>
226
227
228
          <h3{{_i}}>Methods{{/i}}</h3>
          <h4>.modal({{_i}}options{{/i}})</h4>
          <p>{{_i}}Activates your content as a modal. Accepts an optional options <code>object</code>.{{/i}}</p>
229
230
<pre class="prettyprint linenums">
$('#myModal').modal({
Jacob Thornton's avatar
Jacob Thornton committed
231
  keyboard: false
232
})</pre>
Jacob Thornton's avatar
Jacob Thornton committed
233
          <h4>.modal('toggle')</h4>
234
          <p>{{_i}}Manually toggles a modal.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
235
236
          <pre class="prettyprint linenums">$('#myModal').modal('toggle')</pre>
          <h4>.modal('show')</h4>
237
          <p>{{_i}}Manually opens a modal.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
238
239
          <pre class="prettyprint linenums">$('#myModal').modal('show')</pre>
          <h4>.modal('hide')</h4>
240
          <p>{{_i}}Manually hides a modal.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
241
          <pre class="prettyprint linenums">$('#myModal').modal('hide')</pre>
242
243
          <h3>{{_i}}Events{{/i}}</h3>
          <p>{{_i}}Bootstrap's modal class exposes a few events for hooking into modal functionality.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
244
245
246
          <table class="table table-bordered table-striped">
            <thead>
             <tr>
247
248
               <th style="width: 150px;">{{_i}}Event{{/i}}</th>
               <th>{{_i}}Description{{/i}}</th>
Jacob Thornton's avatar
Jacob Thornton committed
249
250
251
252
             </tr>
            </thead>
            <tbody>
             <tr>
253
254
               <td>{{_i}}show{{/i}}</td>
               <td>{{_i}}This event fires immediately when the <code>show</code> instance method is called.{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
255
256
             </tr>
             <tr>
257
258
               <td>{{_i}}shown{{/i}}</td>
               <td>{{_i}}This event is fired when the modal has been made visible to the user (will wait for css transitions to complete).{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
259
260
             </tr>
             <tr>
261
262
               <td>{{_i}}hide{{/i}}</td>
               <td>{{_i}}This event is fired immediately when the <code>hide</code> instance method has been called.{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
263
264
             </tr>
             <tr>
265
266
               <td>{{_i}}hidden{{/i}}</td>
               <td>{{_i}}This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
267
268
269
             </tr>
            </tbody>
          </table>
270
271
272

<pre class="prettyprint linenums">
$('#myModal').on('hidden', function () {
273
  // {{_i}}do something…{{/i}}
274
})</pre>
Jacob Thornton's avatar
Jacob Thornton committed
275
276
277
        </div>
      </div>
    </section>
278
279
280



Jacob Thornton's avatar
Jacob Thornton committed
281
282
283
284
    <!-- Dropdown
    ================================================== -->
    <section id="dropdowns">
      <div class="page-header">
285
        <h1>{{_i}}Dropdowns{{/i}} <small>bootstrap-dropdown.js</small></h1>
Jacob Thornton's avatar
Jacob Thornton committed
286
287
288
      </div>
      <div class="row">
        <div class="span3 columns">
289
290
          <h3>{{_i}}About dropdowns{{/i}}</h3>
          <p>{{_i}}Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.{{/i}}</p>
Mark Otto's avatar
Mark Otto committed
291
          <a href="assets/js/bootstrap-dropdown.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
292
293
        </div>
        <div class="span9 columns">
294
295
          <h2>{{_i}}Examples{{/i}}</h2>
          <p>{{_i}}Click on the dropdown nav links in the navbar and pills below to test dropdowns.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
296
297
298
          <div id="navbar-example" class="navbar navbar-static">
            <div class="navbar-inner">
              <div class="container" style="width: auto;">
299
                <a class="brand" href="#">{{_i}}Project Name{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
300
301
                <ul class="nav">
                  <li class="dropdown">
302
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{_i}}Dropdown{{/i}} <b class="caret"></b></a>
Jacob Thornton's avatar
Jacob Thornton committed
303
                    <ul class="dropdown-menu">
304
305
306
                      <li><a href="#">{{_i}}Action{{/i}}</a></li>
                      <li><a href="#">{{_i}}Another action{{/i}}</a></li>
                      <li><a href="#">{{_i}}Something else here{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
307
                      <li class="divider"></li>
308
                      <li><a href="#">{{_i}}Separated link{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
309
310
311
                    </ul>
                  </li>
                  <li class="dropdown">
312
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{_i}}Dropdown 2 {{/i}}<b class="caret"></b></a>
Jacob Thornton's avatar
Jacob Thornton committed
313
                    <ul class="dropdown-menu">
314
315
316
                      <li><a href="#">{{_i}}Action{{/i}}</a></li>
                      <li><a href="#">{{_i}}Another action{{/i}}</a></li>
                      <li><a href="#">{{_i}}Something else here{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
317
                      <li class="divider"></li>
318
                      <li><a href="#">{{_i}}Separated link{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
319
320
                    </ul>
                  </li>
321
                </ul>
Jacob Thornton's avatar
Jacob Thornton committed
322
323
                <ul class="nav pull-right">
                  <li id="fat-menu" class="dropdown">
324
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{_i}}Dropdown 3{{/i}} <b class="caret"></b></a>
Jacob Thornton's avatar
Jacob Thornton committed
325
                    <ul class="dropdown-menu">
326
327
328
                      <li><a href="#">{{_i}}Action{{/i}}</a></li>
                      <li><a href="#">{{_i}}Another action{{/i}}</a></li>
                      <li><a href="#">{{_i}}Something else here{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
329
                      <li class="divider"></li>
330
                      <li><a href="#">{{_i}}Separated link{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
331
332
                    </ul>
                  </li>
333
                </ul>
Jacob Thornton's avatar
Jacob Thornton committed
334
335
336
              </div>
            </div>
          </div> <!-- /navbar-example -->
337

338
          <ul class="nav nav-pills">
339
            <li class="active"><a href="#">{{_i}}Regular link{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
340
            <li class="dropdown">
341
              <a class="dropdown-toggle" data-toggle="dropdown" href="#">{{_i}}Dropdown{{/i}} <b class="caret"></b></a>
Jacob Thornton's avatar
Jacob Thornton committed
342
              <ul id="menu1" class="dropdown-menu">
343
344
345
                <li><a href="#">{{_i}}Action{{/i}}</a></li>
                <li><a href="#">{{_i}}Another action{{/i}}</a></li>
                <li><a href="#">{{_i}}Something else here{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
346
                <li class="divider"></li>
347
                <li><a href="#">{{_i}}Separated link{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
348
349
350
              </ul>
            </li>
            <li class="dropdown">
351
              <a class="dropdown-toggle" data-toggle="dropdown" href="#">{{_i}}Dropdown 2{{/i}} <b class="caret"></b></a>
Jacob Thornton's avatar
Jacob Thornton committed
352
              <ul id="menu2" class="dropdown-menu">
353
354
355
                <li><a href="#">{{_i}}Action{{/i}}</a></li>
                <li><a href="#">{{_i}}Another action{{/i}}</a></li>
                <li><a href="#">{{_i}}Something else here{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
356
                <li class="divider"></li>
357
                <li><a href="#">{{_i}}Separated link{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
358
359
360
              </ul>
            </li>
            <li class="dropdown">
361
              <a class="dropdown-toggle" data-toggle="dropdown" href="#">{{_i}}Dropdown 3{{/i}} <b class="caret"></b></a>
Jacob Thornton's avatar
Jacob Thornton committed
362
              <ul id="menu3" class="dropdown-menu">
363
364
365
                <li><a href="#">{{_i}}Action{{/i}}</a></li>
                <li><a href="#">{{_i}}Another action{{/i}}</a></li>
                <li><a href="#">{{_i}}Something else here{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
366
                <li class="divider"></li>
367
                <li><a href="#">{{_i}}Separated link{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
368
369
370
              </ul>
            </li>
          </ul> <!-- /tabs -->
371

Jacob Thornton's avatar
Jacob Thornton committed
372
          <hr>
373

374
375
          <h2>{{_i}}Using{{/i}} bootstrap-dropdown.js</h2>
          <p>{{_i}}Call the dropdowns via javascript:{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
376
          <pre class="prettyprint linenums">$('.dropdown-toggle').dropdown()</pre>
377
378
          <h3>{{_i}}Markup{{/i}}</h3>
          <p>{{_i}}To quickly add dropdown functionality to any element just add <code>data-toggle="dropdown"</code> and any valid bootstrap dropdown will automatically be activated.{{/i}}</p>
379
380
381
          <div class="alert alert-info">
            <strong>{{_i}}Heads up!{{/i}}</strong>{{_i}} You may optionally target a specific dropdown by using <code>data-target="#fat"</code> or <code>href="#fat"</code>.{{/i}}
          </div>
382
383

<pre class="prettyprint linenums">
384
&lt;ul class="nav nav-pills"&gt;
Jacob Thornton's avatar
Jacob Thornton committed
385
386
387
  &lt;li class="active"&gt;&lt;a href="#"&gt;Regular link&lt;/a&gt;&lt;/li&gt;
  &lt;li class="dropdown" id="menu1"&gt;
    &lt;a class="dropdown-toggle" data-toggle="dropdown" href="#menu1"&gt;
388
      {{_i}}Dropdown{{/i}}
Jacob Thornton's avatar
Jacob Thornton committed
389
390
391
      &lt;b class="caret"&gt;&lt;/b&gt;
    &lt;/a&gt;
    &lt;ul class="dropdown-menu"&gt;
392
393
394
      &lt;li&gt;&lt;a href="#"&gt;{{_i}}Action{{/i}}&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;{{_i}}Another action{{/i}}&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;{{_i}}Something else here{{/i}}&lt;/a&gt;&lt;/li&gt;
Jacob Thornton's avatar
Jacob Thornton committed
395
      &lt;li class="divider"&gt;&lt;/li&gt;
396
      &lt;li&gt;&lt;a href="#"&gt;{{_i}}Separated link{{/i}}&lt;/a&gt;&lt;/li&gt;
Jacob Thornton's avatar
Jacob Thornton committed
397
398
399
    &lt;/ul&gt;
  &lt;/li&gt;
  ...
400
&lt;/ul&gt;</pre>
401
402
403
404
405
406
407
408
409
410
411
412
413
414
          <p>{{_i}}To keep URLs intact, use the <code>data-target</code> attribute instead of <code>href="#"</code>.{{/i}}</p>
<pre class="prettyprint linenums">
&lt;ul class="nav nav-pills"&gt;
  &lt;li class="dropdown"&gt;
    &lt;a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="path/to/page.html"&gt;
      {{_i}}Dropdown{{/i}}
      &lt;b class="caret"&gt;&lt;/b&gt;
    &lt;/a&gt;
    &lt;ul class="dropdown-menu"&gt;
      ...
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</pre>
415
          <h3>{{_i}}Methods{{/i}}</h3>
Jacob Thornton's avatar
Jacob Thornton committed
416
          <h4>$().dropdown()</h4>
417
          <p>{{_i}}A programatic api for activating menus for a given navbar or tabbed navigation.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
418
419
420
        </div>
      </div>
    </section>
421
422
423



Jacob Thornton's avatar
Jacob Thornton committed
424
425
426
427
   <!-- ScrollSpy
    ================================================== -->
    <section id="scrollspy">
      <div class="page-header">
428
        <h1>{{_i}}ScrollSpy{{/i}} <small>bootstrap-scrollspy.js</small></h1>
Jacob Thornton's avatar
Jacob Thornton committed
429
430
431
      </div>
      <div class="row">
        <div class="span3 columns">
432
          <p>{{_i}}The ScrollSpy plugin is for automatically updating nav targets based on scroll position.{{/i}}</p>
Mark Otto's avatar
Mark Otto committed
433
          <a href="assets/js/bootstrap-scrollspy.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
434
435
        </div>
        <div class="span9 columns">
436
437
          <h2>{{_i}}Example navbar with scrollspy{{/i}}</h2>
          <p>{{_i}}Scroll the area below and watch the navigation update. The dropdown sub items will be highlighted as well. Try it!{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
438
439
440
          <div id="navbarExample" class="navbar navbar-static">
            <div class="navbar-inner">
              <div class="container" style="width: auto;">
441
                <a class="brand" href="#">{{_i}}Project Name{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
442
443
444
445
                <ul class="nav">
                  <li><a href="#fat">@fat</a></li>
                  <li><a href="#mdo">@mdo</a></li>
                  <li class="dropdown">
446
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{_i}}Dropdown{{/i}} <b class="caret"></b></a>
Jacob Thornton's avatar
Jacob Thornton committed
447
                    <ul class="dropdown-menu">
448
449
                      <li><a href="#one">{{_i}}one{{/i}}</a></li>
                      <li><a href="#two">{{_i}}two{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
450
                      <li class="divider"></li>
451
                      <li><a href="#three">{{_i}}three{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
452
453
                    </ul>
                  </li>
454
                </ul>
Jacob Thornton's avatar
Jacob Thornton committed
455
456
              </div>
            </div>
457
          </div>
Jacob Thornton's avatar
Jacob Thornton committed
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
          <div data-spy="scroll" data-target="#navbarExample" data-offset="0" class="scrollspy-example">
            <h4 id="fat">@fat</h4>
            <p>
            Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
            </p>
            <h4 id="mdo">@mdo</h4>
            <p>
            Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.
            </p>
            <h4 id="one">one</h4>
            <p>
            Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.
            </p>
            <h4 id="two">two</h4>
            <p>
            In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.
            </p>
            <h4 id="three">three</h4>
            <p>
            Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
            </p>
            <p>Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.
            </p>
          </div>
          <hr>
483
484
          <h2>{{_i}}Using bootstrap-scrollspy.js{{/i}}</h2>
          <p>{{_i}}Call the scrollspy via javascript:{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
485
          <pre class="prettyprint linenums">$('#navbar').scrollspy()</pre>
486
487
          <h3>{{_i}}Markup{{/i}}</h3>
          <p>{{_i}}To easily add scrollspy behavior to your topbar navigation, just add <code>data-spy="scroll"</code> to the element you want to spy on (most typically this would be the body).{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
488
          <pre class="prettyprint linenums">&lt;body data-spy="scroll" &gt;...&lt;/body&gt;</pre>
489
490
491
492
          <div class="alert alert-info">
            <strong>{{_i}}Heads up!{{/i}}</strong>
            {{_i}}Navbar links must have resolvable id targets. For example, a <code>&lt;a href="#home"&gt;home&lt;/a&gt;</code> must correspond to something in the dom like <code>&lt;div id="home"&gt;&lt;/div&gt;</code>.{{/i}}
          </div>
493
494
495
496
497
498
499
500
          <h3>{{_i}}Methods{{/i}}</h3>
          <h4>.scrollspy('refresh')</h4>
          <p>{{_i}}When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:{{/i}}</p>
<pre class="prettyprint linenums">
$('[data-spy="scroll"]').each(function () {
  var $spy = $(this).scrollspy('refresh')
});
</pre>
501
          <h3>{{_i}}Options{{/i}}</h3>
Jacob Thornton's avatar
Jacob Thornton committed
502
503
504
          <table class="table table-bordered table-striped">
            <thead>
             <tr>
505
506
507
508
               <th style="width: 100px;">{{_i}}Name{{/i}}</th>
               <th style="width: 100px;">{{_i}}type{{/i}}</th>
               <th style="width: 50px;">{{_i}}default{{/i}}</th>
               <th>{{_i}}description{{/i}}</th>
Jacob Thornton's avatar
Jacob Thornton committed
509
510
511
512
             </tr>
            </thead>
            <tbody>
             <tr>
513
514
515
516
               <td>{{_i}}offset{{/i}}</td>
               <td>{{_i}}number{{/i}}</td>
               <td>{{_i}}10{{/i}}</td>
               <td>{{_i}}Pixels to offset from top when calculating position of scroll.{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
517
518
519
             </tr>
            </tbody>
          </table>
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
           <h3>{{_i}}Events{{/i}}</h3>
          <table class="table table-bordered table-striped">
            <thead>
             <tr>
               <th style="width: 150px;">{{_i}}Event{{/i}}</th>
               <th>{{_i}}Description{{/i}}</th>
             </tr>
            </thead>
            <tbody>
             <tr>
               <td>{{_i}}activate{{/i}}</td>
               <td>{{_i}}This event fires whenever a new item becomes activated by the scrollspy.{{/i}}</td>
            </tr>
            </tbody>
          </table>
535
536
        </div>
      </div>
Jacob Thornton's avatar
Jacob Thornton committed
537
    </section>
538
539
540



Jacob Thornton's avatar
Jacob Thornton committed
541
542
543
544
    <!-- Tabs
    ================================================== -->
    <section id="tabs">
      <div class="page-header">
545
        <h1>{{_i}}Togglable tabs{{/i}} <small>bootstrap-tab.js</small></h1>
546
      </div>
Jacob Thornton's avatar
Jacob Thornton committed
547
548
      <div class="row">
        <div class="span3 columns">
549
          <p>{{_i}}This plugin adds quick, dynamic tab and pill functionality for transitioning through local content.{{/i}}</p>
Mark Otto's avatar
Mark Otto committed
550
          <a href="assets/js/bootstrap-tab.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
551
552
        </div>
        <div class="span9 columns">
553
554
          <h2>{{_i}}Example tabs{{/i}}</h2>
          <p>{{_i}}Click the tabs below to toggle between hidden panes, even via dropdown menus.{{/i}}</p>
555
          <ul id="myTab" class="nav nav-tabs">
556
557
            <li class="active"><a href="#home" data-toggle="tab">{{_i}}Home{{/i}}</a></li>
            <li><a href="#profile" data-toggle="tab">{{_i}}Profile{{/i}}</a></li>
Jacob Thornton's avatar
Jacob Thornton committed
558
            <li class="dropdown">
559
              <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{_i}}Dropdown{{/i}} <b class="caret"></b></a>
Jacob Thornton's avatar
Jacob Thornton committed
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
              <ul class="dropdown-menu">
                <li><a href="#dropdown1" data-toggle="tab">@fat</a></li>
                <li><a href="#dropdown2" data-toggle="tab">@mdo</a></li>
              </ul>
            </li>
          </ul>
          <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade in active" id="home">
              <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
            </div>
            <div class="tab-pane fade" id="profile">
              <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
            </div>
            <div class="tab-pane fade" id="dropdown1">
              <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
            </div>
            <div class="tab-pane fade" id="dropdown2">
              <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
            </div>
          </div>
          <hr>
581
          <h2>{{_i}}Using bootstrap-tab.js{{/i}}</h2>
582
583
584
585
586
587
588
          <p>{{_i}}Enable tabbable tabs via javascript (each tab needs to be activated individually):{{/i}}</p>
          <pre class="prettyprint linenums">
$('#myTab a').click(function (e) {
  e.preventDefault();
  $(this).tab('show');
})</pre>
          <p>{{_i}}You can activate individual tabs in several ways:{{/i}}</p>
589
<pre class="prettyprint linenums">
Mark Otto's avatar
Mark Otto committed
590
591
592
593
$('#myTab a[href="#profile"]').tab('show'); // Select tab by name
$('#myTab a:first').tab('show'); // Select first tab
$('#myTab a:last').tab('show'); // Select last tab
$('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
594
</pre>
595
          <h3>{{_i}}Markup{{/i}}</h3>
596
          <p>{{_i}}You can activate a tab or pill navigation without writing any javascript by simply specifying <code>data-toggle="tab"</code> or <code>data-toggle="pill"</code> on an element. Adding the <code>nav</code> and <code>nav-tabs</code> classes to the tab <code>ul</code> will apply the bootstrap tab styling.{{/i}}</p>
597
<pre class="prettyprint linenums">
598
&lt;ul class="nav nav-tabs"&gt;
599
600
601
  &lt;li&gt;&lt;a href="#home" data-toggle="tab"&gt;{{_i}}Home{{/i}}&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#profile" data-toggle="tab"&gt;{{_i}}Profile{{/i}}&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#messages" data-toggle="tab"&gt;{{_i}}Messages{{/i}}&lt;/a&gt;&lt;/li&gt;
Kyle Robinson Young's avatar
Kyle Robinson Young committed
602
  &lt;li&gt;&lt;a href="#settings" data-toggle="tab"&gt;{{_i}}Settings{{/i}}&lt;/a&gt;&lt;/li&gt;
603
&lt;/ul&gt;</pre>
604
          <h3>{{_i}}Methods{{/i}}</h3>
Jacob Thornton's avatar
Jacob Thornton committed
605
606
          <h4>$().tab</h4>
          <p>
Mark Otto's avatar
Mark Otto committed
607
            {{_i}}Activates a tab element and content container. Tab should have either a <code>data-target</code> or an <code>href</code> targeting a container node in the DOM.{{/i}}
Jacob Thornton's avatar
Jacob Thornton committed
608
          </p>
609
<pre class="prettyprint linenums">
610
&lt;ul class="nav nav-tabs" id="myTab"&gt;
611
612
613
614
  &lt;li class="active"&gt;&lt;a href="#home"&gt;{{_i}}Home{{/i}}&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#profile"&gt;{{_i}}Profile{{/i}}&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#messages"&gt;{{_i}}Messages{{/i}}&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#settings"&gt;{{_i}}Settings{{/i}}&lt;/a&gt;&lt;/li&gt;
615
616
617
&lt;/ul&gt;

&lt;div class="tab-content"&gt;
Mark Otto's avatar
Mark Otto committed
618
619
620
621
  &lt;div class="tab-pane active" id="home"&gt;...&lt;/div&gt;
  &lt;div class="tab-pane" id="profile"&gt;...&lt;/div&gt;
  &lt;div class="tab-pane" id="messages"&gt;...&lt;/div&gt;
  &lt;div class="tab-pane" id="settings"&gt;...&lt;/div&gt;
622
623
624
&lt;/div&gt;

&lt;script&gt;
Jacob Thornton's avatar
Jacob Thornton committed
625
  $(function () {
Mark Otto's avatar
Mark Otto committed
626
    $('#myTab a:last').tab('show');
Jacob Thornton's avatar
Jacob Thornton committed
627
  })
628
&lt;/script&gt;</pre>
629
          <h3>{{_i}}Events{{/i}}</h3>
Jacob Thornton's avatar
Jacob Thornton committed
630
631
632
          <table class="table table-bordered table-striped">
            <thead>
             <tr>
633
634
               <th style="width: 150px;">{{_i}}Event{{/i}}</th>
               <th>{{_i}}Description{{/i}}</th>
Jacob Thornton's avatar
Jacob Thornton committed
635
636
637
638
             </tr>
            </thead>
            <tbody>
             <tr>
639
640
               <td>{{_i}}show{{/i}}</td>
               <td>{{_i}}This event fires on tab show, but before the new tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
641
642
            </tr>
            <tr>
643
644
               <td>{{_i}}shown{{/i}}</td>
               <td>{{_i}}This event fires on tab show after a tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
645
646
647
             </tr>
            </tbody>
          </table>
648

Jacob Thornton's avatar
Jacob Thornton committed
649
          <pre class="prettyprint linenums">
650
$('a[data-toggle="tab"]').on('shown', function (e) {
Jacob Thornton's avatar
Jacob Thornton committed
651
652
  e.target // activated tab
  e.relatedTarget // previous tab
653
})</pre>
Jacob Thornton's avatar
Jacob Thornton committed
654
655
656
       </div>
      </div>
    </section>
657
658


Jacob Thornton's avatar
Jacob Thornton committed
659
660
661
662
    <!-- Tooltips
    ================================================== -->
    <section id="tooltips">
      <div class="page-header">
663
        <h1>{{_i}}Tooltips{{/i}} <small>bootstrap-tooltip.js</small></h1>
664
      </div>
Jacob Thornton's avatar
Jacob Thornton committed
665
666
      <div class="row">
        <div class="span3 columns">
667
          <h3>{{_i}}About Tooltips{{/i}}</h3>
668
          <p>{{_i}}Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use css3 for animations, and data-attributes for local title storage.{{/i}}</p>
Mark Otto's avatar
Mark Otto committed
669
          <a href="assets/js/bootstrap-tooltip.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
670
671
        </div>
        <div class="span9 columns">
672
673
          <h2>{{_i}}Example use of Tooltips{{/i}}</h2>
          <p>{{_i}}Hover over the links below to see tooltips:{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
674
          <div class="tooltip-demo well">
Mark Otto's avatar
Mark Otto committed
675
            <p class="muted" style="margin-bottom: 0;">{{_i}}Tight pants next level keffiyeh <a href="#" rel="tooltip" title="first tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" rel="tooltip" title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" rel="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" rel="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.{{/i}}
Jacob Thornton's avatar
Jacob Thornton committed
676
677
678
            </p>
          </div>
          <hr>
679
680
681
682
          <h2>{{_i}}Using{{/i}} bootstrap-tooltip.js</h2>
          <p>{{_i}}Trigger the tooltip via javascript:{{/i}}</p>
          <pre class="prettyprint linenums">$('#example').tooltip({{_i}}options{{/i}})</pre>
          <h3>{{_i}}Options{{/i}}</h3>
Jacob Thornton's avatar
Jacob Thornton committed
683
684
685
          <table class="table table-bordered table-striped">
            <thead>
             <tr>
686
687
               <th style="width: 100px;">{{_i}}Name{{/i}}</th>
               <th style="width: 100px;">{{_i}}type{{/i}}</th>
Jacob Thornton's avatar
Jacob Thornton committed
688
               <th style="width: 50px;">{{_i}}default{{/i}}</th>
689
               <th>{{_i}}description{{/i}}</th>
Jacob Thornton's avatar
Jacob Thornton committed
690
691
692
693
             </tr>
            </thead>
            <tbody>
             <tr>
694
695
               <td>{{_i}}animation{{/i}}</td>
               <td>{{_i}}boolean{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
696
               <td>true</td>
697
               <td>{{_i}}apply a css fade transition to the tooltip{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
698
699
             </tr>
             <tr>
700
               <td>{{_i}}placement{{/i}}</td>
701
               <td>{{_i}}string|function{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
702
               <td>'top'</td>
703
               <td>{{_i}}how to position the tooltip{{/i}} - top | bottom | left | right</td>
Jacob Thornton's avatar
Jacob Thornton committed
704
705
             </tr>
             <tr>
706
707
               <td>{{_i}}selector{{/i}}</td>
               <td>{{_i}}string{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
708
               <td>false</td>
709
               <td>{{_i}}If a selector is provided, tooltip objects will be delegated to the specified targets.{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
710
711
             </tr>
             <tr>
712
713
               <td>{{_i}}title{{/i}}</td>
               <td>{{_i}}string | function{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
714
               <td>''</td>
715
               <td>{{_i}}default title value if `title` tag isn't present{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
716
717
             </tr>
             <tr>
718
719
               <td>{{_i}}trigger{{/i}}</td>
               <td>{{_i}}string{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
720
               <td>'hover'</td>
721
               <td>{{_i}}how tooltip is triggered{{/i}} - hover | focus | manual</td>
Jacob Thornton's avatar
Jacob Thornton committed
722
723
             </tr>
             <tr>
724
725
               <td>{{_i}}delay{{/i}}</td>
               <td>{{_i}}number | object{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
726
727
               <td>0</td>
               <td>
728
                <p>{{_i}}delay showing and hiding the tooltip (ms) - does not apply to manual trigger type{{/i}}</p>
729
730
                <p>{{_i}}If a number is supplied, delay is applied to both hide/show{{/i}}</p>
                <p>{{_i}}Object structure is: <code>delay: { show: 500, hide: 100 }</code>{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
731
732
733
734
               </td>
             </tr>
            </tbody>
          </table>
735
736
737
738
          <div class="alert alert-info">
            <strong>{{_i}}Heads up!{{/i}}</strong>
            {{_i}}Options for individual tooltips can alternatively be specified through the use of data attributes.{{/i}}
          </div>
739
740
          <h3>{{_i}}Markup{{/i}}</h3>
          <p>{{_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}}</p>
741
<pre class="prettyprint linenums">
742
&lt;a href="#" rel="tooltip" title="{{_i}}first tooltip{{/i}}"&gt;{{_i}}hover over me{{/i}}&lt;/a&gt;
743
</pre>
744
745
746
          <h3>{{_i}}Methods{{/i}}</h3>
          <h4>$().tooltip({{_i}}options{{/i}})</h4>
          <p>{{_i}}Attaches a tooltip handler to an element collection.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
747
          <h4>.tooltip('show')</h4>
Mark Otto's avatar
Mark Otto committed
748
          <p>{{_i}}Reveals an element's tooltip.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
749
750
          <pre class="prettyprint linenums">$('#element').tooltip('show')</pre>
          <h4>.tooltip('hide')</h4>
Mark Otto's avatar
Mark Otto committed
751
          <p>{{_i}}Hides an element's tooltip.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
752
          <pre class="prettyprint linenums">$('#element').tooltip('hide')</pre>
753
          <h4>.tooltip('toggle')</h4>
Mark Otto's avatar
Mark Otto committed
754
          <p>{{_i}}Toggles an element's tooltip.{{/i}}</p>
755
          <pre class="prettyprint linenums">$('#element').tooltip('toggle')</pre>
Jacob Thornton's avatar
Jacob Thornton committed
756
757
758
        </div>
      </div>
    </section>
759
760
761



Jacob Thornton's avatar
Jacob Thornton committed
762
763
764
765
    <!-- Popovers
    ================================================== -->
    <section id="popovers">
      <div class="page-header">
766
        <h1>{{_i}}Popovers{{/i}} <small>bootstrap-popover.js</small></h1>
767
      </div>
Jacob Thornton's avatar
Jacob Thornton committed
768
769
      <div class="row">
        <div class="span3 columns">
770
771
          <h3>{{_i}}About popovers{{/i}}</h3>
          <p>{{_i}}Add small overlays of content, like those on the iPad, to any element for housing secondary information.{{/i}}</p>
772
          <p class="muted"><strong>*</strong> {{_i}}Requires <a href="#tooltips">Tooltip</a> to be included{{/i}}</p>
Mark Otto's avatar
Mark Otto committed
773
          <a href="assets/js/bootstrap-popover.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
774
775
        </div>
        <div class="span9 columns">
776
777
          <h2>{{_i}}Example hover popover{{/i}}</h2>
          <p>{{_i}}Hover over the button to trigger the popover.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
778
          <div class="well">
779
            <a href="#" class="btn btn-danger" rel="popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">{{_i}}hover for popover{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
780
781
          </div>
          <hr>
782
783
784
785
          <h2>{{_i}}Using bootstrap-popover.js{{/i}}</h2>
          <p>{{_i}}Enable popovers via javascript:{{/i}}</p>
          <pre class="prettyprint linenums">$('#example').popover({{_i}}options{{/i}})</pre>
          <h3>{{_i}}Options{{/i}}</h3>
Jacob Thornton's avatar
Jacob Thornton committed
786
787
788
          <table class="table table-bordered table-striped">
            <thead>
             <tr>
789
790
791
792
               <th style="width: 100px;">{{_i}}Name{{/i}}</th>
               <th style="width: 100px;">{{_i}}type{{/i}}</th>
               <th style="width: 50px;">{{_i}}default{{/i}}</th>
               <th>{{_i}}description{{/i}}</th>
Jacob Thornton's avatar
Jacob Thornton committed
793
794
795
796
             </tr>
            </thead>
            <tbody>
             <tr>
797
798
               <td>{{_i}}animation{{/i}}</td>
               <td>{{_i}}boolean{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
799
               <td>true</td>
800
               <td>{{_i}}apply a css fade transition to the tooltip{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
801
802
             </tr>
             <tr>
803
               <td>{{_i}}placement{{/i}}</td>
804
               <td>{{_i}}string|function{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
805
               <td>'right'</td>
806
               <td>{{_i}}how to position the popover{{/i}} - top | bottom | left | right</td>
Jacob Thornton's avatar
Jacob Thornton committed
807
808
             </tr>
             <tr>
809
810
               <td>{{_i}}selector{{/i}}</td>
               <td>{{_i}}string{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
811
               <td>false</td>
812
               <td>{{_i}}if a selector is provided, tooltip objects will be delegated to the specified targets{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
813
814
             </tr>
             <tr>
815
816
               <td>{{_i}}trigger{{/i}}</td>
               <td>{{_i}}string{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
817
               <td>'hover'</td>
818
               <td>{{_i}}how tooltip is triggered{{/i}} - hover | focus | manual</td>
Jacob Thornton's avatar
Jacob Thornton committed
819
820
             </tr>
             <tr>
821
822
               <td>{{_i}}title{{/i}}</td>
               <td>{{_i}}string | function{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
823
               <td>''</td>
824
               <td>{{_i}}default title value if `title` attribute isn't present{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
825
826
             </tr>
             <tr>
827
828
               <td>{{_i}}content{{/i}}</td>
               <td>{{_i}}string | function{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
829
               <td>''</td>
830
               <td>{{_i}}default content value if `data-content` attribute isn't present{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
831
832
             </tr>
             <tr>
833
834
               <td>{{_i}}delay{{/i}}</td>
               <td>{{_i}}number | object{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
835
836
               <td>0</td>
               <td>
837
                <p>{{_i}}delay showing and hiding the popover (ms) - does not apply to manual trigger type{{/i}}</p>
838
839
                <p>{{_i}}If a number is supplied, delay is applied to both hide/show{{/i}}</p>
                <p>{{_i}}Object structure is: <code>delay: { show: 500, hide: 100 }</code>{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
840
841
842
843
               </td>
             </tr>
            </tbody>
          </table>
844
845
846
847
          <div class="alert alert-info">
            <strong>{{_i}}Heads up!{{/i}}</strong>
            {{_i}}Options for individual popovers can alternatively be specified through the use of data attributes.{{/i}}
          </div>
848
          <h3>{{_i}}Markup{{/i}}</h3>
Jacob Thornton's avatar
Jacob Thornton committed
849
          <p>
850
          {{_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}}
Jacob Thornton's avatar
Jacob Thornton committed
851
          </p>
852
853
854
          <h3>{{_i}}Methods{{/i}}</h3>
          <h4>$().popover({{_i}}options{{/i}})</h4>
          <p>{{_i}}Initializes popovers for an element collection.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
855
          <h4>.popover('show')</h4>
856
          <p>{{_i}}Reveals an elements popover.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
857
858
          <pre class="prettyprint linenums">$('#element').popover('show')</pre>
          <h4>.popover('hide')</h4>
859
          <p>{{_i}}Hides an elements popover.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
860
          <pre class="prettyprint linenums">$('#element').popover('hide')</pre>
861
862
863
          <h4>.popover('toggle')</h4>
          <p>{{_i}}Toggles an elements popover.{{/i}}</p>
          <pre class="prettyprint linenums">$('#element').popover('toggle')</pre>
Jacob Thornton's avatar
Jacob Thornton committed
864
865
866
        </div>
      </div>
    </section>
867
868
869



Jacob Thornton's avatar
Jacob Thornton committed
870
871
872
873
    <!-- Alert
    ================================================== -->
    <section id="alerts">
      <div class="page-header">
874
        <h1>{{_i}}Alert messages{{/i}} <small>bootstrap-alert.js</small></h1>
875
      </div>
Jacob Thornton's avatar
Jacob Thornton committed
876
877
      <div class="row">
        <div class="span3 columns">
878
879
          <h3>{{_i}}About alerts{{/i}}</h3>
          <p>{{_i}}The alert plugin is a tiny class for adding close functionality to alerts.{{/i}}</p>
Mark Otto's avatar
Mark Otto committed
880
          <a href="assets/js/bootstrap-alert.js" target="_blank" class="btn">{{_i}}Download{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
881
882
        </div>
        <div class="span9 columns">
883
884
          <h2>{{_i}}Example alerts{{/i}}</h2>
          <p>{{_i}}The alerts plugin works on regular alert messages, and block messages.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
885
          <div class="alert fade in">
886
            <button type="button" class="close" data-dismiss="alert">&times;</button>
Mark Otto's avatar
Mark Otto committed
887
            <strong>{{_i}}Holy guacamole!{{/i}}</strong> {{_i}}Best check yo self, you're not looking too good.{{/i}}
Jacob Thornton's avatar
Jacob Thornton committed
888
889
          </div>
          <div class="alert alert-block alert-error fade in">
890
            <button type="button" class="close" data-dismiss="alert">&times;</button>
891
892
            <h4 class="alert-heading">{{_i}}Oh snap! You got an error!{{/i}}</h4>
            <p>{{_i}}Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
893
            <p>
Jacob Thornton's avatar
Jacob Thornton committed
894
              <a class="btn btn-danger" href="#">{{_i}}Take this action{{/i}}</a> <a class="btn" href="#">{{_i}}Or do this{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
895
896
897
            </p>
          </div>
          <hr>
898
          <h2>{{_i}}Using bootstrap-alert.js{{/i}}</h2>
899
          <p>{{_i}}Enable dismissal of an alert via javascript:{{/i}}</p>
900
          <pre class="prettyprint linenums">$(".alert").alert()</pre>
901
902
          <h3>{{_i}}Markup{{/i}}</h3>
          <p>{{_i}}Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert close functionality.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
903
          <pre class="prettyprint linenums">&lt;a class="close" data-dismiss="alert" href="#"&gt;&amp;times;&lt;/a&gt;</pre>
904
          <h3>{{_i}}Methods{{/i}}</h3>
Jacob Thornton's avatar
Jacob Thornton committed
905
          <h4>$().alert()</h4>
906
          <p>{{_i}}Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the <code>.fade</code> and <code>.in</code> class already applied to them.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
907
          <h4>.alert('close')</h4>
908
          <p>{{_i}}Closes an alert.{{/i}}</p>
909
          <pre class="prettyprint linenums">$(".alert").alert('close')</pre>
910
911
          <h3>{{_i}}Events{{/i}}</h3>
          <p>{{_i}}Bootstrap's alert class exposes a few events for hooking into alert functionality.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
912
913
914
          <table class="table table-bordered table-striped">
            <thead>
             <tr>
915
916
               <th style="width: 150px;">{{_i}}Event{{/i}}</th>
               <th>{{_i}}Description{{/i}}</th>
Jacob Thornton's avatar
Jacob Thornton committed
917
918
919
920
             </tr>
            </thead>
            <tbody>
             <tr>
921
922
               <td>{{_i}}close{{/i}}</td>
               <td>{{_i}}This event fires immediately when the <code>close</code> instance method is called.{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
923
924
             </tr>
             <tr>
925
926
               <td>{{_i}}closed{{/i}}</td>
               <td>{{_i}}This event is fired when the alert has been closed (will wait for css transitions to complete).{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
927
928
929
             </tr>
            </tbody>
          </table>
930
931
<pre class="prettyprint linenums">
$('#my-alert').bind('closed', function () {
932
  // {{_i}}do something…{{/i}}
933
})</pre>
Jacob Thornton's avatar
Jacob Thornton committed
934
935
936
        </div>
      </div>
    </section>
937
938
939



Jacob Thornton's avatar
Jacob Thornton committed
940
941
942
943
    <!-- Buttons
    ================================================== -->
    <section id="buttons">
      <div class="page-header">
944
        <h1>{{_i}}Buttons{{/i}} <small>bootstrap-button.js</small></h1>
Jacob Thornton's avatar
Jacob Thornton committed
945
946
947
      </div>
      <div class="row">
        <div class="span3 columns">
948
949
          <h3>{{_i}}About{{/i}}</h3>
          <p>{{_i}}Do more with buttons. Control button states or create groups of buttons for more components like toolbars.{{/i}}</p>
Mark Otto's avatar
Mark Otto committed
950
          <a href="assets/js/bootstrap-button.js" target="_blank" class="btn">{{_i}}Download file{{/i}}</a>
Jacob Thornton's avatar
Jacob Thornton committed
951
952
        </div>
        <div class="span9 columns">
953
954
          <h2>{{_i}}Example uses{{/i}}</h2>
          <p>{{_i}}Use the buttons plugin for states and toggles.{{/i}}</p>
Jacob Thornton's avatar
Jacob Thornton committed
955
956
957
          <table class="table table-bordered table-striped">
            <tbody>
             <tr>
958
               <td>{{_i}}Stateful{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
959
               <td>
960
                  <button id="fat-btn" data-loading-text="loading..." class="btn btn-primary">
961
                    {{_i}}Loading State{{/i}}
Jacob Thornton's avatar
Jacob Thornton committed
962
963
964
965
                  </button>
                </td>
             </tr>
             <tr>
966
               <td>{{_i}}Single toggle{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
967
               <td>
968
                  <button class="btn btn-primary" data-toggle="button">{{_i}}Single Toggle{{/i}}</button>
Jacob Thornton's avatar
Jacob Thornton committed
969
970
971
                </td>
             </tr>
             <tr>
972
               <td>{{_i}}Checkbox{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
973
974
               <td>
                  <div class="btn-group" data-toggle="buttons-checkbox">
975
976
977
                    <button class="btn btn-primary">{{_i}}Left{{/i}}</button>
                    <button class="btn btn-primary">{{_i}}Middle{{/i}}</button>
                    <button class="btn btn-primary">{{_i}}Right{{/i}}</button>
Jacob Thornton's avatar
Jacob Thornton committed
978
979
980
981
                  </div>
               </td>
             </tr>
             <tr>
982
               <td>{{_i}}Radio{{/i}}</td>
Jacob Thornton's avatar
Jacob Thornton committed
983
984
               <td>
                  <div class="btn-group" data-toggle="buttons-radio">
985
986
987
                    <button class="btn btn-primary">{{_i}}Left{{/i}}</button>
                    <button class="btn btn-primary">{{_i}}Middle{{/i}}</button>
                    <button class="btn btn-primary">{{_i}}Right{{/i}}</button>
Jacob Thornton's avatar
Jacob Thornton committed
988
989
990
991
992
993
                  </div>
               </td>
             </tr>
            </tbody>
          </table>
          <hr>
994
995
          <h2>{{_i}}Using bootstrap-button.js{{/i}}</h2>
          <p>{{_i}}Enable buttons via javascript:{{/i}}</p>
Mark Otto's avatar
Mark Otto committed
996
          <pre class="prettyprint linenums">$('.nav-tabs').button()</pre>
997
998
            <h3>{{_i}}Markup{{/i}}</h3>
          <p>{{_i}}Data attributes are integral to the button plugin. Check out the example code below for the various markup types.{{/i}}</p>
999
<pre class="prettyprint linenums">
Mark Otto's avatar
Mark Otto committed
1000
&lt;!-- {{_i}}Add data-toggle="button" to activate toggling on a single button{{/i}} --&gt;
For faster browsing, not all history is shown. View entire blame