unignore bower_components
[bootswatch] / 2 / bower_components / bootstrap / docs / javascript.html
1 <!DOCTYPE html>
2 <html lang="en">
3   <head>
4     <meta charset="utf-8">
5     <title>Javascript ยท Bootstrap</title>
6     <meta name="viewport" content="width=device-width, initial-scale=1.0">
7     <meta name="description" content="">
8     <meta name="author" content="">
9
10     <!-- Le styles -->
11     <link href="assets/css/bootstrap.css" rel="stylesheet">
12     <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
13     <link href="assets/css/docs.css" rel="stylesheet">
14     <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">
15
16     <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
17     <!--[if lt IE 9]>
18       <script src="assets/js/html5shiv.js"></script>
19     <![endif]-->
20
21     <!-- Le fav and touch icons -->
22     <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
23     <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
24       <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
25                     <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
26                                    <link rel="shortcut icon" href="assets/ico/favicon.png">
27
28     <script type="text/javascript">
29       var _gaq = _gaq || [];
30       _gaq.push(['_setAccount', 'UA-146052-10']);
31       _gaq.push(['_trackPageview']);
32       (function() {
33         var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
34         ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
35         var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
36       })();
37     </script>
38   </head>
39
40   <body data-spy="scroll" data-target=".bs-docs-sidebar">
41
42     <!-- Navbar
43     ================================================== -->
44     <div class="navbar navbar-inverse navbar-fixed-top">
45       <div class="navbar-inner">
46         <div class="container">
47           <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
48             <span class="icon-bar"></span>
49             <span class="icon-bar"></span>
50             <span class="icon-bar"></span>
51           </button>
52           <a class="brand" href="./index.html">Bootstrap</a>
53           <div class="nav-collapse collapse">
54             <ul class="nav">
55               <li class="">
56                 <a href="./index.html">Home</a>
57               </li>
58               <li class="">
59                 <a href="./getting-started.html">Get started</a>
60               </li>
61               <li class="">
62                 <a href="./scaffolding.html">Scaffolding</a>
63               </li>
64               <li class="">
65                 <a href="./base-css.html">Base CSS</a>
66               </li>
67               <li class="">
68                 <a href="./components.html">Components</a>
69               </li>
70               <li class="active">
71                 <a href="./javascript.html">JavaScript</a>
72               </li>
73               <li class="">
74                 <a href="./customize.html">Customize</a>
75               </li>
76             </ul>
77           </div>
78         </div>
79       </div>
80     </div>
81
82 <!-- Subhead
83 ================================================== -->
84 <header class="jumbotron subhead">
85   <div class="container">
86     <h1>JavaScript</h1>
87     <p class="lead">Bring Bootstrap's components to life&mdash;now with 13 custom jQuery plugins.
88   </div>
89 </header>
90
91   <div class="container">
92
93     <!-- Docs nav
94     ================================================== -->
95     <div class="row">
96       <div class="span3 bs-docs-sidebar">
97         <ul class="nav nav-list bs-docs-sidenav">
98           <li><a href="#overview"><i class="icon-chevron-right"></i> Overview</a></li>
99           <li><a href="#transitions"><i class="icon-chevron-right"></i> Transitions</a></li>
100           <li><a href="#modals"><i class="icon-chevron-right"></i> Modal</a></li>
101           <li><a href="#dropdowns"><i class="icon-chevron-right"></i> Dropdown</a></li>
102           <li><a href="#scrollspy"><i class="icon-chevron-right"></i> Scrollspy</a></li>
103           <li><a href="#tabs"><i class="icon-chevron-right"></i> Tab</a></li>
104           <li><a href="#tooltips"><i class="icon-chevron-right"></i> Tooltip</a></li>
105           <li><a href="#popovers"><i class="icon-chevron-right"></i> Popover</a></li>
106           <li><a href="#alerts"><i class="icon-chevron-right"></i> Alert</a></li>
107           <li><a href="#buttons"><i class="icon-chevron-right"></i> Button</a></li>
108           <li><a href="#collapse"><i class="icon-chevron-right"></i> Collapse</a></li>
109           <li><a href="#carousel"><i class="icon-chevron-right"></i> Carousel</a></li>
110           <li><a href="#typeahead"><i class="icon-chevron-right"></i> Typeahead</a></li>
111           <li><a href="#affix"><i class="icon-chevron-right"></i> Affix</a></li>
112         </ul>
113       </div>
114       <div class="span9">
115
116
117         <!-- Overview
118         ================================================== -->
119         <section id="overview">
120           <div class="page-header">
121             <h1>JavaScript in Bootstrap</h1>
122           </div>
123
124           <h3>Individual or compiled</h3>
125           <p>Plugins can be included individually (though some have required dependencies), or all at once. Both <strong>bootstrap.js</strong> and <strong>bootstrap.min.js</strong> contain all plugins in a single file.</p>
126
127           <h3>Data attributes</h3>
128           <p>You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.</p>
129
130           <p>That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
131           <pre class="prettyprint linenums">$('body').off('.data-api')</pre>
132
133           <p>Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:</p>
134           <pre class="prettyprint linenums">$('body').off('.alert.data-api')</pre>
135
136           <h3>Programmatic API</h3>
137           <p>We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.</p>
138           <pre class="prettyprint linenums">$(".btn.danger").button("toggle").addClass("fat")</pre>
139           <p>All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):</p>
140 <pre class="prettyprint linenums">
141 $("#myModal").modal()                       // initialized with defaults
142 $("#myModal").modal({ keyboard: false })   // initialized with no keyboard
143 $("#myModal").modal('show')                // initializes and invokes show immediately</p>
144 </pre>
145           <p>Each plugin also exposes its raw constructor on a `Constructor` property: <code>$.fn.popover.Constructor</code>. If you'd like to get a particular plugin instance, retrieve it directly from an element: <code>$('[rel=popover]').data('popover')</code>.</p>
146
147           <h3>No Conflict</h3>
148           <p>Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances,  namespace collisions can occasionally occur. If this happens, you may call <code>.noConflict</code> on the plugin you wish to revert the value of.</p>
149
150 <pre class="prettyprint linenums">
151 var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
152 $.fn.bootstrapBtn = bootstrapButton            // give $().bootstrapBtn the bootstrap functionality
153 </pre>
154
155           <h3>Events</h3>
156           <p>Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. <code>show</code>) is triggered at the start of an event, and its past participle form (ex. <code>shown</code>) is trigger on the completion of an action.</p>
157           <p>All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.</p>
158 <pre class="prettyprint linenums">
159 $('#myModal').on('show', function (e) {
160     if (!data) return e.preventDefault() // stops modal from being shown
161 })
162 </pre>
163         </section>
164
165
166
167         <!-- Transitions
168         ================================================== -->
169         <section id="transitions">
170           <div class="page-header">
171             <h1>Transitions <small>bootstrap-transition.js</small></h1>
172           </div>
173           <h3>About transitions</h3>
174           <p>For simple transition effects, include <strong>bootstrap-transition.js</strong> once alongside the other JS files. If you're using the compiled (or minified) <strong>bootstrap.js</strong>, there is no need to include this&mdash;it's already there.</p>
175           <h3>Use cases</h3>
176           <p>A few examples of the transition plugin:</p>
177           <ul>
178             <li>Sliding or fading in modals</li>
179             <li>Fading out tabs</li>
180             <li>Fading out alerts</li>
181             <li>Sliding carousel panes</li>
182           </ul>
183
184         </section>
185
186
187
188         <!-- Modal
189         ================================================== -->
190         <section id="modals">
191           <div class="page-header">
192             <h1>Modals <small>bootstrap-modal.js</small></h1>
193           </div>
194
195
196           <h2>Examples</h2>
197           <p>Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.</p>
198
199           <h3>Static example</h3>
200           <p>A rendered modal with header, body, and set of actions in the footer.</p>
201           <div class="bs-docs-example" style="background-color: #f5f5f5;">
202             <div class="modal" style="position: relative; top: auto; left: auto; right: auto; margin: 0 auto 20px; z-index: 1; max-width: 100%;">
203               <div class="modal-header">
204                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
205                 <h3>Modal header</h3>
206               </div>
207               <div class="modal-body">
208                 <p>One fine body&hellip;</p>
209               </div>
210               <div class="modal-footer">
211                 <a href="#" class="btn">Close</a>
212                 <a href="#" class="btn btn-primary">Save changes</a>
213               </div>
214             </div>
215           </div>
216 <pre class="prettyprint linenums">
217 &lt;div class="modal hide fade"&gt;
218   &lt;div class="modal-header"&gt;
219     &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
220     &lt;h3&gt;Modal header&lt;/h3&gt;
221   &lt;/div&gt;
222   &lt;div class="modal-body"&gt;
223     &lt;p&gt;One fine body&hellip;&lt;/p&gt;
224   &lt;/div&gt;
225   &lt;div class="modal-footer"&gt;
226     &lt;a href="#" class="btn"&gt;Close&lt;/a&gt;
227     &lt;a href="#" class="btn btn-primary"&gt;Save changes&lt;/a&gt;
228   &lt;/div&gt;
229 &lt;/div&gt;
230 </pre>
231
232           <h3>Live demo</h3>
233           <p>Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.</p>
234           <!-- sample modal content -->
235           <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
236             <div class="modal-header">
237               <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
238               <h3 id="myModalLabel">Modal Heading</h3>
239             </div>
240             <div class="modal-body">
241               <h4>Text in a modal</h4>
242               <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem.</p>
243
244               <h4>Popover in a modal</h4>
245               <p>This <a href="#" role="button" 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 click.</p>
246
247               <h4>Tooltips in a modal</h4>
248               <p><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.</p>
249
250               <hr>
251
252               <h4>Overflowing text to show optional scrollbar</h4>
253               <p>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.</p>
254               <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>
255               <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
256               <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>
257               <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>
258               <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
259               <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>
260             </div>
261             <div class="modal-footer">
262               <button class="btn" data-dismiss="modal">Close</button>
263               <button class="btn btn-primary">Save changes</button>
264             </div>
265           </div>
266           <div class="bs-docs-example" style="padding-bottom: 24px;">
267             <a data-toggle="modal" href="#myModal" class="btn btn-primary btn-large">Launch demo modal</a>
268           </div>
269 <pre class="prettyprint linenums">
270 &lt!-- Button to trigger modal --&gt;
271 &lt;a href="#myModal" role="button" class="btn" data-toggle="modal"&gt;Launch demo modal&lt;/a&gt;
272
273 &lt!-- Modal --&gt;
274 &lt;div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
275   &lt;div class="modal-header"&gt;
276     &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&times;&lt;/button&gt;
277     &lt;h3 id="myModalLabel"&gt;Modal header&lt;/h3&gt;
278   &lt;/div&gt;
279   &lt;div class="modal-body"&gt;
280     &lt;p&gt;One fine body&hellip;&lt;/p&gt;
281   &lt;/div&gt;
282   &lt;div class="modal-footer"&gt;
283     &lt;button class="btn" data-dismiss="modal" aria-hidden="true"&gt;Close&lt;/button&gt;
284     &lt;button class="btn btn-primary"&gt;Save changes&lt;/button&gt;
285   &lt;/div&gt;
286 &lt;/div&gt;
287 </pre>
288
289
290           <hr class="bs-docs-separator">
291
292
293           <h2>Usage</h2>
294
295           <h3>Via data attributes</h3>
296           <p>Activate a modal without writing JavaScript. Set <code>data-toggle="modal"</code> on a controller element, like a button, along with a <code>data-target="#foo"</code> or <code>href="#foo"</code> to target a specific modal to toggle.</p>
297           <pre class="prettyprint linenums">&lt;button type="button" data-toggle="modal" data-target="#myModal"&gt;Launch modal&lt;/button&gt;</pre>
298
299           <h3>Via JavaScript</h3>
300           <p>Call a modal with id <code>myModal</code> with a single line of JavaScript:</p>
301           <pre class="prettyprint linenums">$('#myModal').modal(options)</pre>
302
303           <h3>Options</h3>
304           <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-backdrop=""</code>.</p>
305           <table class="table table-bordered table-striped">
306             <thead>
307              <tr>
308                <th style="width: 100px;">Name</th>
309                <th style="width: 50px;">type</th>
310                <th style="width: 50px;">default</th>
311                <th>description</th>
312              </tr>
313             </thead>
314             <tbody>
315              <tr>
316                <td>backdrop</td>
317                <td>boolean</td>
318                <td>true</td>
319                <td>Includes a modal-backdrop element. Alternatively, specify <code>static</code> for a backdrop which doesn't close the modal on click.</td>
320              </tr>
321              <tr>
322                <td>keyboard</td>
323                <td>boolean</td>
324                <td>true</td>
325                <td>Closes the modal when escape key is pressed</td>
326              </tr>
327              <tr>
328                <td>show</td>
329                <td>boolean</td>
330                <td>true</td>
331                <td>Shows the modal when initialized.</td>
332              </tr>
333              <tr>
334                <td>remote</td>
335                <td>path</td>
336                <td>false</td>
337                <td><p>If a remote url is provided, content will be loaded via jQuery's <code>load</code> method and injected into the <code>.modal-body</code>. If you're using the data api, you may alternatively use the <code>href</code> tag to specify the remote source. An example of this is shown below:</p>
338               <pre class="prettyprint linenums"><code>&lt;a data-toggle="modal" href="remote.html" data-target="#modal"&gt;click me&lt;/a&gt;</code></pre></td>
339              </tr>
340             </tbody>
341           </table>
342
343           <h3>Methods</h3>
344           <h4>.modal(options)</h4>
345           <p>Activates your content as a modal. Accepts an optional options <code>object</code>.</p>
346 <pre class="prettyprint linenums">
347 $('#myModal').modal({
348   keyboard: false
349 })
350 </pre>
351           <h4>.modal('toggle')</h4>
352           <p>Manually toggles a modal.</p>
353           <pre class="prettyprint linenums">$('#myModal').modal('toggle')</pre>
354           <h4>.modal('show')</h4>
355           <p>Manually opens a modal.</p>
356           <pre class="prettyprint linenums">$('#myModal').modal('show')</pre>
357           <h4>.modal('hide')</h4>
358           <p>Manually hides a modal.</p>
359           <pre class="prettyprint linenums">$('#myModal').modal('hide')</pre>
360           <h3>Events</h3>
361           <p>Bootstrap's modal class exposes a few events for hooking into modal functionality.</p>
362           <table class="table table-bordered table-striped">
363             <thead>
364              <tr>
365                <th style="width: 150px;">Event</th>
366                <th>Description</th>
367              </tr>
368             </thead>
369             <tbody>
370              <tr>
371                <td>show</td>
372                <td>This event fires immediately when the <code>show</code> instance method is called.</td>
373              </tr>
374              <tr>
375                <td>shown</td>
376                <td>This event is fired when the modal has been made visible to the user (will wait for css transitions to complete).</td>
377              </tr>
378              <tr>
379                <td>hide</td>
380                <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
381              </tr>
382              <tr>
383                <td>hidden</td>
384                <td>This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).</td>
385              </tr>
386             </tbody>
387           </table>
388 <pre class="prettyprint linenums">
389 $('#myModal').on('hidden', function () {
390   // do somethingโ€ฆ
391 })
392 </pre>
393         </section>
394
395
396
397         <!-- Dropdowns
398         ================================================== -->
399         <section id="dropdowns">
400           <div class="page-header">
401             <h1>Dropdowns <small>bootstrap-dropdown.js</small></h1>
402           </div>
403
404
405           <h2>Examples</h2>
406           <p>Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.</p>
407
408           <h3>Within a navbar</h3>
409           <div class="bs-docs-example">
410             <div id="navbar-example" class="navbar navbar-static">
411               <div class="navbar-inner">
412                 <div class="container" style="width: auto;">
413                   <a class="brand" href="#">Project Name</a>
414                   <ul class="nav" role="navigation">
415                     <li class="dropdown">
416                       <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
417                       <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
418                         <li role="presentation"><a role="menuitem" tabindex="-1" href="http://google.com">Action</a></li>
419                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#anotherAction">Another action</a></li>
420                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
421                         <li role="presentation" class="divider"></li>
422                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
423                       </ul>
424                     </li>
425                     <li class="dropdown">
426                       <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2 <b class="caret"></b></a>
427                       <ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
428                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
429                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
430                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
431                         <li role="presentation" class="divider"></li>
432                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
433                       </ul>
434                     </li>
435                   </ul>
436                   <ul class="nav pull-right">
437                     <li id="fat-menu" class="dropdown">
438                       <a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 3 <b class="caret"></b></a>
439                       <ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
440                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
441                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
442                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
443                         <li role="presentation" class="divider"></li>
444                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
445                       </ul>
446                     </li>
447                   </ul>
448                 </div>
449               </div>
450             </div> <!-- /navbar-example -->
451           </div>
452
453           <h3>Within tabs</h3>
454           <div class="bs-docs-example">
455             <ul class="nav nav-pills">
456               <li class="active"><a href="#">Regular link</a></li>
457               <li class="dropdown">
458                 <a class="dropdown-toggle" id="drop4" role="button" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a>
459                 <ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4">
460                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
461                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
462                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
463                   <li role="presentation" class="divider"></li>
464                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
465                 </ul>
466               </li>
467               <li class="dropdown">
468                 <a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 2 <b class="caret"></b></a>
469                 <ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5">
470                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
471                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
472                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
473                   <li role="presentation" class="divider"></li>
474                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
475                 </ul>
476               </li>
477               <li class="dropdown">
478                 <a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 3 <b class="caret"></b></a>
479                 <ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop5">
480                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
481                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
482                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
483                   <li role="presentation" class="divider"></li>
484                   <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
485                 </ul>
486               </li>
487             </ul> <!-- /tabs -->
488           </div>
489
490
491           <hr class="bs-docs-separator">
492
493
494           <h2>Usage</h2>
495
496           <h3>Via data attributes</h3>
497           <p>Add <code>data-toggle="dropdown"</code> to a link or button to toggle a dropdown.</p>
498 <pre class="prettyprint linenums">
499 &lt;div class="dropdown"&gt;
500   &lt;a class="dropdown-toggle" data-toggle="dropdown" href="#"&gt;Dropdown trigger&lt;/a&gt;
501   &lt;ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"&gt;
502     ...
503   &lt;/ul&gt;
504 &lt;/div&gt;
505 </pre>
506           <p>To keep URLs intact, use the <code>data-target</code> attribute instead of <code>href="#"</code>.</p>
507 <pre class="prettyprint linenums">
508 &lt;div class="dropdown"&gt;
509   &lt;a class="dropdown-toggle" id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="/page.html"&gt;
510     Dropdown
511     &lt;b class="caret"&gt;&lt;/b&gt;
512   &lt;/a&gt;
513   &lt;ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"&gt;
514     ...
515   &lt;/ul&gt;
516 &lt;/div&gt;
517 </pre>
518
519           <h3>Via JavaScript</h3>
520           <p>Call the dropdowns via JavaScript:</p>
521           <pre class="prettyprint linenums">$('.dropdown-toggle').dropdown()</pre>
522
523           <h3>Options</h3>
524           <p><em>None</em></p>
525
526           <h3>Methods</h3>
527           <h4>$().dropdown('toggle')</h4>
528           <p>A programmatic api for toggling menus for a given navbar or tabbed navigation.</p>
529         </section>
530
531
532
533         <!-- ScrollSpy
534         ================================================== -->
535         <section id="scrollspy">
536           <div class="page-header">
537             <h1>ScrollSpy <small>bootstrap-scrollspy.js</small></h1>
538           </div>
539
540
541           <h2>Example in navbar</h2>
542           <p>The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.</p>
543           <div class="bs-docs-example">
544             <div id="navbarExample" class="navbar navbar-static">
545               <div class="navbar-inner">
546                 <div class="container" style="width: auto;">
547                   <a class="brand" href="#">Project Name</a>
548                   <ul class="nav">
549                     <li><a href="#fat">@fat</a></li>
550                     <li><a href="#mdo">@mdo</a></li>
551                     <li class="dropdown">
552                       <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
553                       <ul class="dropdown-menu">
554                         <li><a href="#one">one</a></li>
555                         <li><a href="#two">two</a></li>
556                         <li class="divider"></li>
557                         <li><a href="#three">three</a></li>
558                       </ul>
559                     </li>
560                   </ul>
561                 </div>
562               </div>
563             </div>
564             <div data-spy="scroll" data-target="#navbarExample" data-offset="0" class="scrollspy-example">
565               <h4 id="fat">@fat</h4>
566               <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>
567               <h4 id="mdo">@mdo</h4>
568               <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>
569               <h4 id="one">one</h4>
570               <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>
571               <h4 id="two">two</h4>
572               <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>
573               <h4 id="three">three</h4>
574               <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>
575               <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.
576               </p>
577             </div>
578           </div>
579
580
581           <hr class="bs-docs-separator">
582
583
584           <h2>Usage</h2>
585
586           <h3>Via data attributes</h3>
587           <p>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) and <code>data-target=".navbar"</code> to select which nav to use. You'll want to use scrollspy with a <code>.nav</code> component.</p>
588           <pre class="prettyprint linenums">&lt;body data-spy="scroll" data-target=".navbar"&gt;...&lt;/body&gt;</pre>
589
590           <h3>Via JavaScript</h3>
591           <p>Call the scrollspy via JavaScript:</p>
592           <pre class="prettyprint linenums">$('#navbar').scrollspy()</pre>
593
594           <div class="alert alert-info">
595             <strong>Heads up!</strong>
596             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>.
597           </div>
598
599           <h3>Methods</h3>
600           <h4>.scrollspy('refresh')</h4>
601           <p>When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:</p>
602 <pre class="prettyprint linenums">
603 $('[data-spy="scroll"]').each(function () {
604   var $spy = $(this).scrollspy('refresh')
605 });
606 </pre>
607
608           <h3>Options</h3>
609           <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-offset=""</code>.</p>
610           <table class="table table-bordered table-striped">
611             <thead>
612              <tr>
613                <th style="width: 100px;">Name</th>
614                <th style="width: 100px;">type</th>
615                <th style="width: 50px;">default</th>
616                <th>description</th>
617              </tr>
618             </thead>
619             <tbody>
620              <tr>
621                <td>offset</td>
622                <td>number</td>
623                <td>10</td>
624                <td>Pixels to offset from top when calculating position of scroll.</td>
625              </tr>
626             </tbody>
627           </table>
628
629           <h3>Events</h3>
630           <table class="table table-bordered table-striped">
631             <thead>
632              <tr>
633                <th style="width: 150px;">Event</th>
634                <th>Description</th>
635              </tr>
636             </thead>
637             <tbody>
638              <tr>
639                <td>activate</td>
640                <td>This event fires whenever a new item becomes activated by the scrollspy.</td>
641             </tr>
642             </tbody>
643           </table>
644         </section>
645
646
647
648         <!-- Tabs
649         ================================================== -->
650         <section id="tabs">
651           <div class="page-header">
652             <h1>Togglable tabs <small>bootstrap-tab.js</small></h1>
653           </div>
654
655
656           <h2>Example tabs</h2>
657           <p>Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.</p>
658           <div class="bs-docs-example">
659             <ul id="myTab" class="nav nav-tabs">
660               <li class="active"><a href="#home" data-toggle="tab">Home</a></li>
661               <li><a href="#profile" data-toggle="tab">Profile</a></li>
662               <li class="dropdown">
663                 <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
664                 <ul class="dropdown-menu">
665                   <li><a href="#dropdown1" data-toggle="tab">@fat</a></li>
666                   <li><a href="#dropdown2" data-toggle="tab">@mdo</a></li>
667                 </ul>
668               </li>
669             </ul>
670             <div id="myTabContent" class="tab-content">
671               <div class="tab-pane fade in active" id="home">
672                 <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>
673               </div>
674               <div class="tab-pane fade" id="profile">
675                 <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>
676               </div>
677               <div class="tab-pane fade" id="dropdown1">
678                 <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>
679               </div>
680               <div class="tab-pane fade" id="dropdown2">
681                 <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>
682               </div>
683             </div>
684           </div>
685
686
687           <hr class="bs-docs-separator">
688
689
690           <h2>Usage</h2>
691           <p>Enable tabbable tabs via JavaScript (each tab needs to be activated individually):</p>
692 <pre class="prettyprint linenums">
693 $('#myTab a').click(function (e) {
694   e.preventDefault();
695   $(this).tab('show');
696 })</pre>
697           <p>You can activate individual tabs in several ways:</p>
698 <pre class="prettyprint linenums">
699 $('#myTab a[href="#profile"]').tab('show'); // Select tab by name
700 $('#myTab a:first').tab('show'); // Select first tab
701 $('#myTab a:last').tab('show'); // Select last tab
702 $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
703 </pre>
704
705           <h3>Markup</h3>
706           <p>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.</p>
707 <pre class="prettyprint linenums">
708 &lt;ul class="nav nav-tabs"&gt;
709   &lt;li&gt;&lt;a href="#home" data-toggle="tab"&gt;Home&lt;/a&gt;&lt;/li&gt;
710   &lt;li&gt;&lt;a href="#profile" data-toggle="tab"&gt;Profile&lt;/a&gt;&lt;/li&gt;
711   &lt;li&gt;&lt;a href="#messages" data-toggle="tab"&gt;Messages&lt;/a&gt;&lt;/li&gt;
712   &lt;li&gt;&lt;a href="#settings" data-toggle="tab"&gt;Settings&lt;/a&gt;&lt;/li&gt;
713 &lt;/ul&gt;</pre>
714
715           <h3>Methods</h3>
716           <h4>$().tab</h4>
717           <p>
718             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.
719           </p>
720 <pre class="prettyprint linenums">
721 &lt;ul class="nav nav-tabs" id="myTab"&gt;
722   &lt;li class="active"&gt;&lt;a href="#home"&gt;Home&lt;/a&gt;&lt;/li&gt;
723   &lt;li&gt;&lt;a href="#profile"&gt;Profile&lt;/a&gt;&lt;/li&gt;
724   &lt;li&gt;&lt;a href="#messages"&gt;Messages&lt;/a&gt;&lt;/li&gt;
725   &lt;li&gt;&lt;a href="#settings"&gt;Settings&lt;/a&gt;&lt;/li&gt;
726 &lt;/ul&gt;
727
728 &lt;div class="tab-content"&gt;
729   &lt;div class="tab-pane active" id="home"&gt;...&lt;/div&gt;
730   &lt;div class="tab-pane" id="profile"&gt;...&lt;/div&gt;
731   &lt;div class="tab-pane" id="messages"&gt;...&lt;/div&gt;
732   &lt;div class="tab-pane" id="settings"&gt;...&lt;/div&gt;
733 &lt;/div&gt;
734
735 &lt;script&gt;
736   $(function () {
737     $('#myTab a:last').tab('show');
738   })
739 &lt;/script&gt;
740 </pre>
741
742           <h3>Events</h3>
743           <table class="table table-bordered table-striped">
744             <thead>
745              <tr>
746                <th style="width: 150px;">Event</th>
747                <th>Description</th>
748              </tr>
749             </thead>
750             <tbody>
751              <tr>
752                <td>show</td>
753                <td>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.</td>
754             </tr>
755             <tr>
756                <td>shown</td>
757                <td>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.</td>
758              </tr>
759             </tbody>
760           </table>
761 <pre class="prettyprint linenums">
762 $('a[data-toggle="tab"]').on('shown', function (e) {
763   e.target // activated tab
764   e.relatedTarget // previous tab
765 })
766 </pre>
767         </section>
768
769
770         <!-- Tooltips
771         ================================================== -->
772         <section id="tooltips">
773           <div class="page-header">
774             <h1>Tooltips <small>bootstrap-tooltip.js</small></h1>
775           </div>
776
777
778           <h2>Examples</h2>
779           <p>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.</p>
780           <p>For performance reasons, the tooltip and popover data-apis are opt in, meaning <strong>you must initialize them yourself</strong>.</p>
781           <p>Hover over the links below to see tooltips:</p>
782           <div class="bs-docs-example tooltip-demo">
783             <p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" data-toggle="tooltip" title="Default 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="#" data-toggle="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="#" data-toggle="tooltip" title="A much longer tooltip belongs right here to demonstrate the max-width we apply.">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
784             </p>
785           </div>
786
787           <h3>Four directions</h3>
788           <div class="bs-docs-example tooltip-demo">
789             <ul class="bs-docs-tooltip-examples">
790               <li><a href="#" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</a></li>
791               <li><a href="#" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</a></li>
792               <li><a href="#" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</a></li>
793               <li><a href="#" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</a></li>
794             </ul>
795           </div>
796
797
798           <h3>Tooltips in input groups</h3>
799           <p>When using tooltips and popovers with the Bootstrap input groups, you'll have to set the <code>container</code> (documented below) option to avoid unwanted side effects.</p>
800
801           <hr class="bs-docs-separator">
802
803
804           <h2>Usage</h2>
805           <p>Trigger the tooltip via JavaScript:</p>
806           <pre class="prettyprint linenums">$('#example').tooltip(options)</pre>
807
808           <h3>Options</h3>
809           <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-animation=""</code>.</p>
810           <table class="table table-bordered table-striped">
811             <thead>
812              <tr>
813                <th style="width: 100px;">Name</th>
814                <th style="width: 100px;">type</th>
815                <th style="width: 50px;">default</th>
816                <th>description</th>
817              </tr>
818             </thead>
819             <tbody>
820              <tr>
821                <td>animation</td>
822                <td>boolean</td>
823                <td>true</td>
824                <td>apply a css fade transition to the tooltip</td>
825              </tr>
826              <tr>
827                <td>html</td>
828                <td>boolean</td>
829                <td>false</td>
830                <td>Insert html into the tooltip. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.</td>
831              </tr>
832              <tr>
833                <td>placement</td>
834                <td>string | function</td>
835                <td>'top'</td>
836                <td>how to position the tooltip - top | bottom | left | right</td>
837              </tr>
838              <tr>
839                <td>selector</td>
840                <td>string</td>
841                <td>false</td>
842                <td>If a selector is provided, tooltip objects will be delegated to the specified targets.</td>
843              </tr>
844              <tr>
845                <td>title</td>
846                <td>string | function</td>
847                <td>''</td>
848                <td>default title value if `title` tag isn't present</td>
849              </tr>
850              <tr>
851                <td>trigger</td>
852                <td>string</td>
853                <td>'hover focus'</td>
854                <td>how tooltip is triggered - click | hover | focus | manual. Note you case pass trigger mutliple, space seperated, trigger types.</td>
855              </tr>
856              <tr>
857                <td>delay</td>
858                <td>number | object</td>
859                <td>0</td>
860                <td>
861                 <p>delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p>
862                 <p>If a number is supplied, delay is applied to both hide/show</p>
863                 <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
864                </td>
865              </tr>
866              <tr>
867                <td>container</td>
868                <td>string | false</td>
869                <td>false</td>
870                <td>
871                 <p>Appends the tooltip to a specific element <code>container: 'body'</code></p>
872                </td>
873              </tr>
874             </tbody>
875           </table>
876           <div class="alert alert-info">
877             <strong>Heads up!</strong>
878             Options for individual tooltips can alternatively be specified through the use of data attributes.
879           </div>
880
881           <h3>Markup</h3>
882           <pre class="prettyprint linenums">&lt;a href="#" data-toggle="tooltip" title="first tooltip"&gt;hover over me&lt;/a&gt;</pre>
883
884           <h3>Methods</h3>
885           <h4>$().tooltip(options)</h4>
886           <p>Attaches a tooltip handler to an element collection.</p>
887           <h4>.tooltip('show')</h4>
888           <p>Reveals an element's tooltip.</p>
889           <pre class="prettyprint linenums">$('#element').tooltip('show')</pre>
890           <h4>.tooltip('hide')</h4>
891           <p>Hides an element's tooltip.</p>
892           <pre class="prettyprint linenums">$('#element').tooltip('hide')</pre>
893           <h4>.tooltip('toggle')</h4>
894           <p>Toggles an element's tooltip.</p>
895           <pre class="prettyprint linenums">$('#element').tooltip('toggle')</pre>
896           <h4>.tooltip('destroy')</h4>
897           <p>Hides and destroys an element's tooltip.</p>
898           <pre class="prettyprint linenums">$('#element').tooltip('destroy')</pre>
899         </section>
900
901
902
903       <!-- Popovers
904       ================================================== -->
905       <section id="popovers">
906         <div class="page-header">
907           <h1>Popovers <small>bootstrap-popover.js</small></h1>
908         </div>
909
910         <h2>Examples</h2>
911         <p>Add small overlays of content, like those on the iPad, to any element for housing secondary information. Hover over the button to trigger the popover. <strong>Requires <a href="#tooltips">Tooltip</a> to be included.</strong></p>
912
913         <h3>Static popover</h3>
914         <p>Four options are available: top, right, bottom, and left aligned.</p>
915         <div class="bs-docs-example bs-docs-example-popover">
916           <div class="popover top">
917             <div class="arrow"></div>
918             <h3 class="popover-title">Popover top</h3>
919             <div class="popover-content">
920               <p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
921             </div>
922           </div>
923
924           <div class="popover right">
925             <div class="arrow"></div>
926             <h3 class="popover-title">Popover right</h3>
927             <div class="popover-content">
928               <p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
929             </div>
930           </div>
931
932           <div class="popover bottom">
933             <div class="arrow"></div>
934             <h3 class="popover-title">Popover bottom</h3>
935             <div class="popover-content">
936               <p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
937             </div>
938           </div>
939
940           <div class="popover left">
941             <div class="arrow"></div>
942             <h3 class="popover-title">Popover left</h3>
943             <div class="popover-content">
944               <p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
945             </div>
946           </div>
947
948           <div class="clearfix"></div>
949         </div>
950         <p>No markup shown as popovers are generated from JavaScript and content within a <code>data</code> attribute.</p>
951
952         <h3>Live demo</h3>
953         <div class="bs-docs-example" style="padding-bottom: 24px;">
954           <a href="#" class="btn btn-large btn-danger" data-toggle="popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">Click to toggle popover</a>
955         </div>
956
957         <h4>Four directions</h4>
958         <div class="bs-docs-example tooltip-demo">
959           <ul class="bs-docs-tooltip-examples">
960             <li><a href="#" class="btn" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on top">Popover on top</a></li>
961             <li><a href="#" class="btn" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on right">Popover on right</a></li>
962             <li><a href="#" class="btn" data-toggle="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on bottom">Popover on bottom</a></li>
963             <li><a href="#" class="btn" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." title="Popover on left">Popover on left</a></li>
964           </ul>
965         </div>
966
967
968         <hr class="bs-docs-separator">
969
970
971         <h2>Usage</h2>
972         <p>Enable popovers via JavaScript:</p>
973         <pre class="prettyprint linenums">$('#example').popover(options)</pre>
974
975         <h3>Options</h3>
976         <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-animation=""</code>.</p>
977         <table class="table table-bordered table-striped">
978           <thead>
979            <tr>
980              <th style="width: 100px;">Name</th>
981              <th style="width: 100px;">type</th>
982              <th style="width: 50px;">default</th>
983              <th>description</th>
984            </tr>
985           </thead>
986           <tbody>
987            <tr>
988              <td>animation</td>
989              <td>boolean</td>
990              <td>true</td>
991              <td>apply a css fade transition to the tooltip</td>
992            </tr>
993            <tr>
994              <td>html</td>
995              <td>boolean</td>
996              <td>false</td>
997              <td>Insert html into the popover. If false, jquery's <code>text</code> method will be used to insert content into the dom. Use text if you're worried about XSS attacks.</td>
998            </tr>
999            <tr>
1000              <td>placement</td>
1001              <td>string | function</td>
1002              <td>'right'</td>
1003              <td>how to position the popover - top | bottom | left | right</td>
1004            </tr>
1005            <tr>
1006              <td>selector</td>
1007              <td>string</td>
1008              <td>false</td>
1009              <td>if a selector is provided, tooltip objects will be delegated to the specified targets</td>
1010            </tr>
1011            <tr>
1012              <td>trigger</td>
1013              <td>string</td>
1014              <td>'click'</td>
1015              <td>how popover is triggered - click | hover | focus | manual</td>
1016            </tr>
1017            <tr>
1018              <td>title</td>
1019              <td>string | function</td>
1020              <td>''</td>
1021              <td>default title value if `title` attribute isn't present</td>
1022            </tr>
1023            <tr>
1024              <td>content</td>
1025              <td>string | function</td>
1026              <td>''</td>
1027              <td>default content value if `data-content` attribute isn't present</td>
1028            </tr>
1029            <tr>
1030              <td>delay</td>
1031              <td>number | object</td>
1032              <td>0</td>
1033              <td>
1034               <p>delay showing and hiding the popover (ms) - does not apply to manual trigger type</p>
1035               <p>If a number is supplied, delay is applied to both hide/show</p>
1036               <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
1037              </td>
1038            </tr>
1039            <tr>
1040              <td>container</td>
1041              <td>string | false</td>
1042              <td>false</td>
1043              <td>
1044               <p>Appends the popover to a specific element <code>container: 'body'</code></p>
1045              </td>
1046            </tr>
1047           </tbody>
1048         </table>
1049         <div class="alert alert-info">
1050           <strong>Heads up!</strong>
1051           Options for individual popovers can alternatively be specified through the use of data attributes.
1052         </div>
1053
1054         <h3>Markup</h3>
1055         <p>For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.</p>
1056
1057         <h3>Methods</h3>
1058         <h4>$().popover(options)</h4>
1059         <p>Initializes popovers for an element collection.</p>
1060         <h4>.popover('show')</h4>
1061         <p>Reveals an elements popover.</p>
1062         <pre class="prettyprint linenums">$('#element').popover('show')</pre>
1063         <h4>.popover('hide')</h4>
1064         <p>Hides an elements popover.</p>
1065         <pre class="prettyprint linenums">$('#element').popover('hide')</pre>
1066         <h4>.popover('toggle')</h4>
1067         <p>Toggles an elements popover.</p>
1068         <pre class="prettyprint linenums">$('#element').popover('toggle')</pre>
1069         <h4>.popover('destroy')</h4>
1070         <p>Hides and destroys an element's popover.</p>
1071         <pre class="prettyprint linenums">$('#element').popover('destroy')</pre>
1072       </section>
1073
1074
1075
1076       <!-- Alert
1077       ================================================== -->
1078       <section id="alerts">
1079         <div class="page-header">
1080           <h1>Alert messages <small>bootstrap-alert.js</small></h1>
1081         </div>
1082
1083
1084         <h2>Example alerts</h2>
1085         <p>Add dismiss functionality to all alert messages with this plugin.</p>
1086         <div class="bs-docs-example">
1087           <div class="alert fade in">
1088             <button type="button" class="close" data-dismiss="alert">&times;</button>
1089             <strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
1090           </div>
1091         </div>
1092
1093         <div class="bs-docs-example">
1094           <div class="alert alert-block alert-error fade in">
1095             <button type="button" class="close" data-dismiss="alert">&times;</button>
1096             <h4 class="alert-heading">Oh snap! You got an error!</h4>
1097             <p>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.</p>
1098             <p>
1099               <a class="btn btn-danger" href="#">Take this action</a> <a class="btn" href="#">Or do this</a>
1100             </p>
1101           </div>
1102         </div>
1103
1104
1105         <hr class="bs-docs-separator">
1106
1107
1108         <h2>Usage</h2>
1109         <p>Enable dismissal of an alert via JavaScript:</p>
1110         <pre class="prettyprint linenums">$(".alert").alert()</pre>
1111
1112         <h3>Markup</h3>
1113         <p>Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert close functionality.</p>
1114         <pre class="prettyprint linenums">&lt;a class="close" data-dismiss="alert" href="#"&gt;&amp;times;&lt;/a&gt;</pre>
1115
1116         <h3>Methods</h3>
1117         <h4>$().alert()</h4>
1118         <p>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.</p>
1119         <h4>.alert('close')</h4>
1120         <p>Closes an alert.</p>
1121         <pre class="prettyprint linenums">$(".alert").alert('close')</pre>
1122
1123
1124         <h3>Events</h3>
1125         <p>Bootstrap's alert class exposes a few events for hooking into alert functionality.</p>
1126         <table class="table table-bordered table-striped">
1127           <thead>
1128            <tr>
1129              <th style="width: 150px;">Event</th>
1130              <th>Description</th>
1131            </tr>
1132           </thead>
1133           <tbody>
1134            <tr>
1135              <td>close</td>
1136              <td>This event fires immediately when the <code>close</code> instance method is called.</td>
1137            </tr>
1138            <tr>
1139              <td>closed</td>
1140              <td>This event is fired when the alert has been closed (will wait for css transitions to complete).</td>
1141            </tr>
1142           </tbody>
1143         </table>
1144 <pre class="prettyprint linenums">
1145 $('#my-alert').bind('closed', function () {
1146   // do somethingโ€ฆ
1147 })
1148 </pre>
1149       </section>
1150
1151
1152
1153           <!-- Buttons
1154           ================================================== -->
1155           <section id="buttons">
1156             <div class="page-header">
1157               <h1>Buttons <small>bootstrap-button.js</small></h1>
1158             </div>
1159
1160             <h2>Example uses</h2>
1161             <p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p>
1162
1163             <h4>Stateful</h4>
1164             <p>Add <code>data-loading-text="Loading..."</code> to use a loading state on a button.</p>
1165             <div class="bs-docs-example" style="padding-bottom: 24px;">
1166               <button type="button" id="fat-btn" data-loading-text="loading..." class="btn btn-primary">
1167                 Loading state
1168               </button>
1169             </div>
1170             <pre class="prettyprint linenums">&lt;button type="button" class="btn btn-primary" data-loading-text="Loading..."&gt;Loading state&lt;/button&gt;</pre>
1171
1172             <h4>Single toggle</h4>
1173             <p>Add <code>data-toggle="button"</code> to activate toggling on a single button.</p>
1174             <div class="bs-docs-example" style="padding-bottom: 24px;">
1175               <button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button>
1176             </div>
1177             <pre class="prettyprint linenums">&lt;button type="button" class="btn btn-primary" data-toggle="button"&gt;Single Toggle&lt;/button&gt;</pre>
1178
1179             <h4>Checkbox</h4>
1180             <p>Add <code>data-toggle="buttons-checkbox"</code> for checkbox style toggling on btn-group.</p>
1181             <div class="bs-docs-example" style="padding-bottom: 24px;">
1182               <div class="btn-group" data-toggle="buttons-checkbox">
1183                 <button type="button" class="btn btn-primary">Left</button>
1184                 <button type="button" class="btn btn-primary">Middle</button>
1185                 <button type="button" class="btn btn-primary">Right</button>
1186               </div>
1187             </div>
1188 <pre class="prettyprint linenums">
1189 &lt;div class="btn-group" data-toggle="buttons-checkbox"&gt;
1190   &lt;button type="button" class="btn btn-primary"&gt;Left&lt;/button&gt;
1191   &lt;button type="button" class="btn btn-primary"&gt;Middle&lt;/button&gt;
1192   &lt;button type="button" class="btn btn-primary"&gt;Right&lt;/button&gt;
1193 &lt;/div&gt;
1194 </pre>
1195
1196             <h4>Radio</h4>
1197             <p>Add <code>data-toggle="buttons-radio"</code> for radio style toggling on btn-group.</p>
1198             <div class="bs-docs-example" style="padding-bottom: 24px;">
1199               <div class="btn-group" data-toggle="buttons-radio">
1200                 <button type="button" class="btn btn-primary">Left</button>
1201                 <button type="button" class="btn btn-primary">Middle</button>
1202                 <button type="button" class="btn btn-primary">Right</button>
1203               </div>
1204             </div>
1205 <pre class="prettyprint linenums">
1206 &lt;div class="btn-group" data-toggle="buttons-radio"&gt;
1207   &lt;button type="button" class="btn btn-primary"&gt;Left&lt;/button&gt;
1208   &lt;button type="button" class="btn btn-primary"&gt;Middle&lt;/button&gt;
1209   &lt;button type="button" class="btn btn-primary"&gt;Right&lt;/button&gt;
1210 &lt;/div&gt;
1211 </pre>
1212
1213
1214             <hr class="bs-docs-separator">
1215
1216
1217             <h2>Usage</h2>
1218             <p>Enable buttons via JavaScript:</p>
1219             <pre class="prettyprint linenums">$('.nav-tabs').button()</pre>
1220
1221             <h3>Markup</h3>
1222             <p>Data attributes are integral to the button plugin. Check out the example code below for the various markup types.</p>
1223
1224             <h3>Options</h3>
1225             <p><em>None</em></p>
1226
1227             <h3>Methods</h3>
1228             <h4>$().button('toggle')</h4>
1229             <p>Toggles push state. Gives the button the appearance that it has been activated.</p>
1230             <div class="alert alert-info">
1231               <strong>Heads up!</strong>
1232               You can enable auto toggling of a button by using the <code>data-toggle</code> attribute.
1233             </div>
1234             <pre class="prettyprint linenums">&lt;button type="button" class="btn" data-toggle="button" &gt;โ€ฆ&lt;/button&gt;</pre>
1235             <h4>$().button('loading')</h4>
1236             <p>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 <code>data-loading-text</code>.
1237             </p>
1238             <pre class="prettyprint linenums">&lt;button type="button" class="btn" data-loading-text="loading stuff..." &gt;...&lt;/button&gt;</pre>
1239             <div class="alert alert-info">
1240               <strong>Heads up!</strong>
1241               <a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists the disabled state across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.
1242             </div>
1243             <h4>$().button('reset')</h4>
1244             <p>Resets button state - swaps text to original text.</p>
1245             <h4>$().button(string)</h4>
1246             <p>Resets button state - swaps text to any data defined text state.</p>
1247 <pre class="prettyprint linenums">&lt;button type="button" class="btn" data-complete-text="finished!" &gt;...&lt;/button&gt;
1248 &lt;script&gt;
1249   $('.btn').button('complete')
1250 &lt;/script&gt;
1251 </pre>
1252           </section>
1253
1254
1255
1256           <!-- Collapse
1257           ================================================== -->
1258           <section id="collapse">
1259             <div class="page-header">
1260               <h1>Collapse <small>bootstrap-collapse.js</small></h1>
1261             </div>
1262
1263             <h3>About</h3>
1264             <p>Get base styles and flexible support for collapsible components like accordions and navigation.</p>
1265             <p class="muted"><strong>*</strong> Requires the Transitions plugin to be included.</p>
1266
1267             <h2>Example accordion</h2>
1268             <p>Using the collapse plugin, we built a simple accordion style widget:</p>
1269
1270             <div class="bs-docs-example">
1271               <div class="accordion" id="accordion2">
1272                 <div class="accordion-group">
1273                   <div class="accordion-heading">
1274                     <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
1275                       Collapsible Group Item #1
1276                     </a>
1277                   </div>
1278                   <div id="collapseOne" class="accordion-body collapse in">
1279                     <div class="accordion-inner">
1280                       Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
1281                     </div>
1282                   </div>
1283                 </div>
1284                 <div class="accordion-group">
1285                   <div class="accordion-heading">
1286                     <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
1287                       Collapsible Group Item #2
1288                     </a>
1289                   </div>
1290                   <div id="collapseTwo" class="accordion-body collapse">
1291                     <div class="accordion-inner">
1292                       Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
1293                     </div>
1294                   </div>
1295                 </div>
1296                 <div class="accordion-group">
1297                   <div class="accordion-heading">
1298                     <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree">
1299                       Collapsible Group Item #3
1300                     </a>
1301                   </div>
1302                   <div id="collapseThree" class="accordion-body collapse">
1303                     <div class="accordion-inner">
1304                       Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
1305                     </div>
1306                   </div>
1307                 </div>
1308               </div>
1309             </div>
1310 <pre class="prettyprint linenums">
1311 &lt;div class="accordion" id="accordion2"&gt;
1312   &lt;div class="accordion-group"&gt;
1313     &lt;div class="accordion-heading"&gt;
1314       &lt;a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne"&gt;
1315         Collapsible Group Item #1
1316       &lt;/a&gt;
1317     &lt;/div&gt;
1318     &lt;div id="collapseOne" class="accordion-body collapse in"&gt;
1319       &lt;div class="accordion-inner"&gt;
1320         Anim pariatur cliche...
1321       &lt;/div&gt;
1322     &lt;/div&gt;
1323   &lt;/div&gt;
1324   &lt;div class="accordion-group"&gt;
1325     &lt;div class="accordion-heading"&gt;
1326       &lt;a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"&gt;
1327         Collapsible Group Item #2
1328       &lt;/a&gt;
1329     &lt;/div&gt;
1330     &lt;div id="collapseTwo" class="accordion-body collapse"&gt;
1331       &lt;div class="accordion-inner"&gt;
1332         Anim pariatur cliche...
1333       &lt;/div&gt;
1334     &lt;/div&gt;
1335   &lt;/div&gt;
1336 &lt;/div&gt;
1337 ...
1338 </pre>
1339             <p>You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.</p>
1340 <pre class="prettyprint linenums">
1341 &lt;button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo"&gt;
1342   simple collapsible
1343 &lt;/button&gt;
1344
1345 &lt;div id="demo" class="collapse in"&gt; โ€ฆ &lt;/div&gt;
1346 </pre>
1347
1348
1349             <hr class="bs-docs-separator">
1350
1351
1352             <h2>Usage</h2>
1353
1354             <h3>Via data attributes</h3>
1355             <p>Just add <code>data-toggle="collapse"</code> and a <code>data-target</code> to element to automatically assign control of a collapsible element. The <code>data-target</code> attribute accepts a css selector to apply the collapse to. Be sure to add the class <code>collapse</code> to the collapsible element. If you'd like it to default open, add the additional class <code>in</code>.</p>
1356             <p>To add accordion-like group management to a collapsible control, add the data attribute <code>data-parent="#selector"</code>. Refer to the demo to see this in action.</p>
1357
1358             <h3>Via JavaScript</h3>
1359             <p>Enable manually with:</p>
1360             <pre class="prettyprint linenums">$(".collapse").collapse()</pre>
1361
1362             <h3>Options</h3>
1363             <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-parent=""</code>.</p>
1364             <table class="table table-bordered table-striped">
1365               <thead>
1366                <tr>
1367                  <th style="width: 100px;">Name</th>
1368                  <th style="width: 50px;">type</th>
1369                  <th style="width: 50px;">default</th>
1370                  <th>description</th>
1371                </tr>
1372               </thead>
1373               <tbody>
1374                <tr>
1375                  <td>parent</td>
1376                  <td>selector</td>
1377                  <td>false</td>
1378                  <td>If selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior)</td>
1379                </tr>
1380                <tr>
1381                  <td>toggle</td>
1382                  <td>boolean</td>
1383                  <td>true</td>
1384                  <td>Toggles the collapsible element on invocation</td>
1385                </tr>
1386               </tbody>
1387             </table>
1388
1389
1390             <h3>Methods</h3>
1391             <h4>.collapse(options)</h4>
1392             <p>Activates your content as a collapsible element. Accepts an optional options <code>object</code>.
1393 <pre class="prettyprint linenums">
1394 $('#myCollapsible').collapse({
1395   toggle: false
1396 })
1397 </pre>
1398             <h4>.collapse('toggle')</h4>
1399             <p>Toggles a collapsible element to shown or hidden.</p>
1400             <h4>.collapse('show')</h4>
1401             <p>Shows a collapsible element.</p>
1402             <h4>.collapse('hide')</h4>
1403             <p>Hides a collapsible element.</p>
1404
1405             <h3>Events</h3>
1406             <p>Bootstrap's collapse class exposes a few events for hooking into collapse functionality.</p>
1407             <table class="table table-bordered table-striped">
1408               <thead>
1409                <tr>
1410                  <th style="width: 150px;">Event</th>
1411                  <th>Description</th>
1412                </tr>
1413               </thead>
1414               <tbody>
1415                <tr>
1416                  <td>show</td>
1417                  <td>This event fires immediately when the <code>show</code> instance method is called.</td>
1418                </tr>
1419                <tr>
1420                  <td>shown</td>
1421                  <td>This event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).</td>
1422                </tr>
1423                <tr>
1424                  <td>hide</td>
1425                  <td>
1426                   This event is fired immediately when the <code>hide</code> method has been called.
1427                  </td>
1428                </tr>
1429                <tr>
1430                  <td>hidden</td>
1431                  <td>This event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).</td>
1432                </tr>
1433               </tbody>
1434             </table>
1435 <pre class="prettyprint linenums">
1436 $('#myCollapsible').on('hidden', function () {
1437   // do somethingโ€ฆ
1438 })</pre>
1439           </section>
1440
1441
1442
1443            <!-- Carousel
1444           ================================================== -->
1445           <section id="carousel">
1446             <div class="page-header">
1447               <h1>Carousel <small>bootstrap-carousel.js</small></h1>
1448             </div>
1449
1450             <h2>Example carousel</h2>
1451             <p>The slideshow below shows a generic plugin and component for cycling through elements like a carousel.</p>
1452             <div class="bs-docs-example">
1453               <div id="myCarousel" class="carousel slide">
1454                 <ol class="carousel-indicators">
1455                   <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
1456                   <li data-target="#myCarousel" data-slide-to="1"></li>
1457                   <li data-target="#myCarousel" data-slide-to="2"></li>
1458                 </ol>
1459                 <div class="carousel-inner">
1460                   <div class="item active">
1461                     <img src="assets/img/bootstrap-mdo-sfmoma-01.jpg" alt="">
1462                     <div class="carousel-caption">
1463                       <h4>First Thumbnail label</h4>
1464                       <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
1465                     </div>
1466                   </div>
1467                   <div class="item">
1468                     <img src="assets/img/bootstrap-mdo-sfmoma-02.jpg" alt="">
1469                     <div class="carousel-caption">
1470                       <h4>Second Thumbnail label</h4>
1471                       <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
1472                     </div>
1473                   </div>
1474                   <div class="item">
1475                     <img src="assets/img/bootstrap-mdo-sfmoma-03.jpg" alt="">
1476                     <div class="carousel-caption">
1477                       <h4>Third Thumbnail label</h4>
1478                       <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
1479                     </div>
1480                   </div>
1481                 </div>
1482                 <a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a>
1483                 <a class="right carousel-control" href="#myCarousel" data-slide="next">&rsaquo;</a>
1484               </div>
1485             </div>
1486 <pre class="prettyprint linenums">
1487 &lt;div id="myCarousel" class="carousel slide"&gt;
1488   &lt;ol class="carousel-indicators"&gt
1489     &lt;li data-target="#myCarousel" data-slide-to="0" class="active"&gt&lt;/li&gt
1490     &lt;li data-target="#myCarousel" data-slide-to="1"&gt&lt;/li&gt
1491     &lt;li data-target="#myCarousel" data-slide-to="2"&gt&lt;/li&gt
1492   &lt;/ol&gt
1493   &lt;!-- Carousel items --&gt;
1494   &lt;div class="carousel-inner"&gt;
1495     &lt;div class="active item"&gt;โ€ฆ&lt;/div&gt;
1496     &lt;div class="item"&gt;โ€ฆ&lt;/div&gt;
1497     &lt;div class="item"&gt;โ€ฆ&lt;/div&gt;
1498   &lt;/div&gt;
1499   &lt;!-- Carousel nav --&gt;
1500   &lt;a class="carousel-control left" href="#myCarousel" data-slide="prev"&gt;&amp;lsaquo;&lt;/a&gt;
1501   &lt;a class="carousel-control right" href="#myCarousel" data-slide="next"&gt;&amp;rsaquo;&lt;/a&gt;
1502 &lt;/div&gt;
1503 </pre>
1504
1505             <div class="alert alert-warning">
1506               <strong>Heads up!</strong>
1507               When implementing this carousel, remove the images we have provided and replace them with your own.
1508             </div>
1509
1510
1511             <hr class="bs-docs-separator">
1512
1513
1514             <h2>Usage</h2>
1515
1516             <h3>Via data attributes</h3>
1517             <p>Use data attributes to easily control the position of the carousel. <code>data-slide</code> accepts the keywords <code>prev</code> or <code>next</code>, which alters the slide position relative to it's current position. Alternatively, use <code>data-slide-to</code> to pass a raw slide index to the carousel <code>data-slide-to="2"</code>, which jump's the slide position to a particular index beginning with <code>0</code>.</p>
1518
1519             <h3>Via JavaScript</h3>
1520             <p>Call carousel manually with:</p>
1521             <pre class="prettyprint linenums">$('.carousel').carousel()</pre>
1522
1523             <h3>Options</h3>
1524             <p>Options can be passed via data attributes or JavaScriptz. For data attributes, append the option name to <code>data-</code>, as in <code>data-interval=""</code>.</p>
1525             <table class="table table-bordered table-striped">
1526               <thead>
1527                <tr>
1528                  <th style="width: 100px;">Name</th>
1529                  <th style="width: 50px;">type</th>
1530                  <th style="width: 50px;">default</th>
1531                  <th>description</th>
1532                </tr>
1533               </thead>
1534               <tbody>
1535                <tr>
1536                  <td>interval</td>
1537                  <td>number</td>
1538                  <td>5000</td>
1539                  <td>The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.</td>
1540                </tr>
1541                <tr>
1542                  <td>pause</td>
1543                  <td>string</td>
1544                  <td>"hover"</td>
1545                  <td>Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.</td>
1546                </tr>
1547               </tbody>
1548             </table>
1549
1550             <h3>Methods</h3>
1551             <h4>.carousel(options)</h4>
1552             <p>Initializes the carousel with an optional options <code>object</code> and starts cycling through items.</p>
1553 <pre class="prettyprint linenums">
1554 $('.carousel').carousel({
1555   interval: 2000
1556 })
1557 </pre>
1558             <h4>.carousel('cycle')</h4>
1559             <p>Cycles through the carousel items from left to right.</p>
1560             <h4>.carousel('pause')</h4>
1561             <p>Stops the carousel from cycling through items.</p>
1562             <h4>.carousel(number)</h4>
1563             <p>Cycles the carousel to a particular frame (0 based, similar to an array).</p>
1564             <h4>.carousel('prev')</h4>
1565             <p>Cycles to the previous item.</p>
1566             <h4>.carousel('next')</h4>
1567             <p>Cycles to the next item.</p>
1568
1569             <h3>Events</h3>
1570             <p>Bootstrap's carousel class exposes two events for hooking into carousel functionality.</p>
1571             <table class="table table-bordered table-striped">
1572               <thead>
1573                <tr>
1574                  <th style="width: 150px;">Event</th>
1575                  <th>Description</th>
1576                </tr>
1577               </thead>
1578               <tbody>
1579                <tr>
1580                  <td>slide</td>
1581                  <td>This event fires immediately when the <code>slide</code> instance method is invoked.</td>
1582                </tr>
1583                <tr>
1584                  <td>slid</td>
1585                  <td>This event is fired when the carousel has completed its slide transition.</td>
1586                </tr>
1587               </tbody>
1588             </table>
1589           </section>
1590
1591
1592
1593           <!-- Typeahead
1594           ================================================== -->
1595           <section id="typeahead">
1596             <div class="page-header">
1597               <h1>Typeahead <small>bootstrap-typeahead.js</small></h1>
1598             </div>
1599
1600
1601             <h2>Example</h2>
1602             <p>A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.</p>
1603             <div class="bs-docs-example" style="background-color: #f5f5f5;">
1604               <input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="4" data-source='["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]'>
1605             </div>
1606             <pre class="prettyprint linenums">&lt;input type="text" data-provide="typeahead"&gt;</pre>
1607             <p>You'll want to set <code>autocomplete="off"</code> to prevent default browser menus from appearing over the Bootstrap typeahead dropdown.</p>
1608
1609             <hr class="bs-docs-separator">
1610
1611
1612             <h2>Usage</h2>
1613
1614             <h3>Via data attributes</h3>
1615             <p>Add data attributes to register an element with typeahead functionality as shown in the example above.</p>
1616
1617             <h3>Via JavaScript</h3>
1618             <p>Call the typeahead manually with:</p>
1619             <pre class="prettyprint linenums">$('.typeahead').typeahead()</pre>
1620
1621             <h3>Options</h3>
1622             <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-source=""</code>.</p>
1623             <table class="table table-bordered table-striped">
1624               <thead>
1625                <tr>
1626                  <th style="width: 100px;">Name</th>
1627                  <th style="width: 50px;">type</th>
1628                  <th style="width: 100px;">default</th>
1629                  <th>description</th>
1630                </tr>
1631               </thead>
1632               <tbody>
1633                 <tr>
1634                  <td>source</td>
1635                  <td>array, function</td>
1636                  <td>[ ]</td>
1637                  <td>The data source to query against. May be an array of strings or a function. The function is passed two arguments, the <code>query</code> value in the input field and the <code>process</code> callback. The function may be used synchronously by returning the data source directly or asynchronously via the <code>process</code> callback's single argument.</td>
1638                </tr>
1639                <tr>
1640                  <td>items</td>
1641                  <td>number</td>
1642                  <td>8</td>
1643                  <td>The max number of items to display in the dropdown.</td>
1644                </tr>
1645                <tr>
1646                  <td>minLength</td>
1647                  <td>number</td>
1648                  <td>1</td>
1649                  <td>The minimum character length needed before triggering autocomplete suggestions</td>
1650                </tr>
1651                <tr>
1652                  <td>matcher</td>
1653                  <td>function</td>
1654                  <td>case insensitive</td>
1655                  <td>The method used to determine if a query matches an item. Accepts a single argument, the <code>item</code> against which to test the query. Access the current query with <code>this.query</code>. Return a boolean <code>true</code> if query is a match.</td>
1656                </tr>
1657                <tr>
1658                  <td>sorter</td>
1659                  <td>function</td>
1660                  <td>exact match,<br> case sensitive,<br> case insensitive</td>
1661                  <td>Method used to sort autocomplete results. Accepts a single argument <code>items</code> and has the scope of the typeahead instance. Reference the current query with <code>this.query</code>.</td>
1662                </tr>
1663                <tr>
1664                  <td>updater</td>
1665                  <td>function</td>
1666                  <td>returns selected item</td>
1667                  <td>The method used to return selected item. Accepts a single argument, the <code>item</code> and has the scope of the typeahead instance.</td>
1668                </tr>
1669                <tr>
1670                  <td>highlighter</td>
1671                  <td>function</td>
1672                  <td>highlights all default matches</td>
1673                  <td>Method used to highlight autocomplete results. Accepts a single argument <code>item</code> and has the scope of the typeahead instance. Should return html.</td>
1674                </tr>
1675               </tbody>
1676             </table>
1677
1678             <h3>Methods</h3>
1679             <h4>.typeahead(options)</h4>
1680             <p>Initializes an input with a typeahead.</p>
1681           </section>
1682
1683
1684
1685           <!-- Affix
1686           ================================================== -->
1687           <section id="affix">
1688             <div class="page-header">
1689               <h1>Affix <small>bootstrap-affix.js</small></h1>
1690             </div>
1691
1692             <h2>Example</h2>
1693             <p>The subnavigation on the left is a live demo of the affix plugin.</p>
1694
1695             <hr class="bs-docs-separator">
1696
1697             <h2>Usage</h2>
1698
1699             <h3>Via data attributes</h3>
1700             <p>To easily add affix behavior to any element, just add <code>data-spy="affix"</code> to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.</p>
1701
1702             <pre class="prettyprint linenums">&lt;div data-spy="affix" data-offset-top="200"&gt;...&lt;/div&gt;</pre>
1703
1704             <div class="alert alert-info">
1705               <strong>Heads up!</strong>
1706               You must manage the position of a pinned element and the behavior of its immediate parent. Position is controlled by <code>affix</code>, <code>affix-top</code>, and <code>affix-bottom</code>. Remember to check for a potentially collapsed parent when the affix kicks in as it's removing content from the normal flow of the page.
1707             </div>
1708
1709             <h3>Via JavaScript</h3>
1710             <p>Call the affix plugin via JavaScript:</p>
1711             <pre class="prettyprint linenums">$('#navbar').affix()</pre>
1712
1713           <h3>Options</h3>
1714           <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-offset-top="200"</code>.</p>
1715           <table class="table table-bordered table-striped">
1716             <thead>
1717              <tr>
1718                <th style="width: 100px;">Name</th>
1719                <th style="width: 100px;">type</th>
1720                <th style="width: 50px;">default</th>
1721                <th>description</th>
1722              </tr>
1723             </thead>
1724             <tbody>
1725              <tr>
1726                <td>offset</td>
1727                <td>number | function | object</td>
1728                <td>10</td>
1729                <td>Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and left directions. To listen for a single direction, or multiple unique offsets, just provide an object <code>offset: { x: 10 }</code>. Use a function when you need to dynamically provide an offset (useful for some responsive designs).</td>
1730              </tr>
1731             </tbody>
1732           </table>
1733         </section>
1734
1735
1736
1737       </div>
1738     </div>
1739
1740   </div>
1741
1742
1743
1744     <!-- Footer
1745     ================================================== -->
1746     <footer class="footer">
1747       <div class="container">
1748         <p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p>
1749         <p>Code licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
1750         <p><a href="http://glyphicons.com">Glyphicons Free</a> licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
1751         <ul class="footer-links">
1752           <li><a href="http://blog.getbootstrap.com">Blog</a></li>
1753           <li class="muted">&middot;</li>
1754           <li><a href="https://github.com/twbs/bootstrap/issues?state=open">Issues</a></li>
1755           <li class="muted">&middot;</li>
1756           <li><a href="https://github.com/twbs/bootstrap/releases">Changelog</a></li>
1757         </ul>
1758       </div>
1759     </footer>
1760
1761
1762
1763     <!-- Le javascript
1764     ================================================== -->
1765     <!-- Placed at the end of the document so the pages load faster -->
1766     <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
1767     <script src="assets/js/jquery.js"></script>
1768     <script src="assets/js/bootstrap-transition.js"></script>
1769     <script src="assets/js/bootstrap-alert.js"></script>
1770     <script src="assets/js/bootstrap-modal.js"></script>
1771     <script src="assets/js/bootstrap-dropdown.js"></script>
1772     <script src="assets/js/bootstrap-scrollspy.js"></script>
1773     <script src="assets/js/bootstrap-tab.js"></script>
1774     <script src="assets/js/bootstrap-tooltip.js"></script>
1775     <script src="assets/js/bootstrap-popover.js"></script>
1776     <script src="assets/js/bootstrap-button.js"></script>
1777     <script src="assets/js/bootstrap-collapse.js"></script>
1778     <script src="assets/js/bootstrap-carousel.js"></script>
1779     <script src="assets/js/bootstrap-typeahead.js"></script>
1780     <script src="assets/js/bootstrap-affix.js"></script>
1781
1782     <script src="assets/js/holder/holder.js"></script>
1783     <script src="assets/js/google-code-prettify/prettify.js"></script>
1784
1785     <script src="assets/js/application.js"></script>
1786
1787
1788     <!-- Analytics
1789     ================================================== -->
1790     <script>
1791       var _gauges = _gauges || [];
1792       (function() {
1793         var t   = document.createElement('script');
1794         t.type  = 'text/javascript';
1795         t.async = true;
1796         t.id    = 'gauges-tracker';
1797         t.setAttribute('data-site-id', '4f0dc9fef5a1f55508000013');
1798         t.src = '//secure.gaug.es/track.js';
1799         var s = document.getElementsByTagName('script')[0];
1800         s.parentNode.insertBefore(t, s);
1801       })();
1802     </script>
1803
1804   </body>
1805 </html>