PageRenderTime 64ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/src/honeynet_web/honeywall/static/twitter-bootstrap/docs/javascript.html

https://bitbucket.org/cpdean/pig
HTML | 1480 lines | 1367 code | 71 blank | 42 comment | 0 complexity | a65106a92e97a6e3abe4701ea3f3e2e6 MD5 | raw file
Possible License(s): Apache-2.0, LGPL-2.1
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Bootstrap, from Twitter</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="description" content="">
  8. <meta name="author" content="">
  9. <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
  10. <!--[if lt IE 9]>
  11. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  12. <![endif]-->
  13. <!-- Le styles -->
  14. <link href="assets/css/bootstrap.css" rel="stylesheet">
  15. <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
  16. <link href="assets/css/docs.css" rel="stylesheet">
  17. <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">
  18. <!-- Le fav and touch icons -->
  19. <link rel="shortcut icon" href="assets/ico/favicon.ico">
  20. <link rel="apple-touch-icon" href="assets/ico/apple-touch-icon.png">
  21. <link rel="apple-touch-icon" sizes="72x72" href="assets/ico/apple-touch-icon-72x72.png">
  22. <link rel="apple-touch-icon" sizes="114x114" href="assets/ico/apple-touch-icon-114x114.png">
  23. </head>
  24. <body data-spy="scroll" data-target=".subnav" data-offset="50">
  25. <!-- Navbar
  26. ================================================== -->
  27. <div class="navbar navbar-fixed-top">
  28. <div class="navbar-inner">
  29. <div class="container">
  30. <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. <span class="icon-bar"></span>
  34. </a>
  35. <a class="brand" href="./index.html">Bootstrap</a>
  36. <div class="nav-collapse">
  37. <ul class="nav">
  38. <li class="">
  39. <a href="./index.html">Overview</a>
  40. </li>
  41. <li class="">
  42. <a href="./scaffolding.html">Scaffolding</a>
  43. </li>
  44. <li class="">
  45. <a href="./base-css.html">Base CSS</a>
  46. </li>
  47. <li class="">
  48. <a href="./components.html">Components</a>
  49. </li>
  50. <li class="active">
  51. <a href="./javascript.html">Javascript plugins</a>
  52. </li>
  53. <li class="">
  54. <a href="./less.html">Using LESS</a>
  55. </li>
  56. <li class="divider-vertical"></li>
  57. <li class="">
  58. <a href="./download.html">Customize</a>
  59. </li>
  60. <li class="">
  61. <a href="./examples.html">Examples</a>
  62. </li>
  63. </ul>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="container">
  69. <!-- Masthead
  70. ================================================== -->
  71. <header class="jumbotron subhead" id="overview">
  72. <h1>Javascript for Bootstrap</h1>
  73. <p class="lead">Bring Bootstrap's components to life&mdash;now with 12 custom <a href="http://jquery.com/" target="_blank">jQuery</a> plugins.
  74. <div class="subnav">
  75. <ul class="nav nav-pills">
  76. <li><a href="#javascript">All plugins</a></li>
  77. <li><a href="#modals">Modal</a></li>
  78. <li><a href="#dropdowns">Dropdown</a></li>
  79. <li><a href="#scrollspy">Scrollspy</a></li>
  80. <li><a href="#tabs">Tab</a></li>
  81. <li><a href="#tooltips">Tooltip</a></li>
  82. <li><a href="#popovers">Popover</a></li>
  83. <li><a href="#alerts">Alert</a></li>
  84. <li><a href="#buttons">Button</a></li>
  85. <li><a href="#collapse">Collapse</a></li>
  86. <li><a href="#carousel">Carousel</a></li>
  87. <li><a href="#typeahead">Typeahead</a></li>
  88. </ul>
  89. </div>
  90. </header>
  91. <!-- Using Javascript w/ Bootstrap
  92. ================================================== -->
  93. <section id="javascript">
  94. <div class="page-header">
  95. <h1>jQuery plugins <small>A dozen Bootstrap plugins to get you started</small></h1>
  96. </div>
  97. <div class="row">
  98. <div class="span3">
  99. <label>
  100. <h3><a href="./javascript.html#modals">Modals</a></h3>
  101. <p>A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.</p>
  102. </label>
  103. </div>
  104. <div class="span3">
  105. <label>
  106. <h3><a href="./javascript.html#dropdowns">Dropdowns</a></h3>
  107. <p>Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.</p>
  108. </label>
  109. </div>
  110. <div class="span3">
  111. <label>
  112. <h3><a href="./javascript.html#scrollspy">Scrollspy</a></h3>
  113. <p>Use scrollspy to automatically update the links in your navbar to show the current active link based on scroll position.</p>
  114. </label>
  115. </div>
  116. <div class="span3">
  117. <label>
  118. <h3><a href="./javascript.html#tabs">Togglable tabs</a></h3>
  119. <p>Use this plugin to make tabs and pills more useful by allowing them to toggle through tabbable panes of local content.</p>
  120. </label>
  121. </div>
  122. </div> <!-- /row -->
  123. <div class="row">
  124. <div class="span3">
  125. <label>
  126. <h3><a href="./javascript.html#tooltips">Tooltips</a></h3>
  127. <p>A new take on the jQuery Tipsy plugin, Tooltips don't rely on images, uss CSS3 for animations, and data-attributes for local title storage.</p>
  128. </label>
  129. </div>
  130. <div class="span3">
  131. <label>
  132. <h3><a href="./javascript.html#popovers">Popovers</a> <small class="muted">*</small></h3>
  133. <p>Add small overlays of content, like those on the iPad, to any element for housing secondary information.</p>
  134. <p class="muted"><strong>*</strong> Requires <a href="#tooltips">Tooltips</a> to be included</p>
  135. </label>
  136. </div>
  137. <div class="span3">
  138. <label>
  139. <h3><a href="./javascript.html#alerts">Alert messages</a></h3>
  140. <p>The alert plugin is a tiny class for adding close functionality to alerts.</p>
  141. </label>
  142. </div>
  143. <div class="span3">
  144. <label>
  145. <h3><a href="./javascript.html#buttons">Buttons</a></h3>
  146. <p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p>
  147. </label>
  148. </div>
  149. </div> <!-- /row -->
  150. <div class="row" style="margin-bottom: 9px;">
  151. <div class="span3">
  152. <label>
  153. <h3><a href="./javascript.html#collapse">Collapse</a></h3>
  154. <p>Get base styles and flexible support for collapsible components like accordions and navigation.</p>
  155. </label>
  156. </div>
  157. <div class="span3">
  158. <label>
  159. <h3><a href="./javascript.html#carousel">Carousel</a></h3>
  160. <p>Create a merry-go-round of any content you wish to provide an interactive slideshow of content.</p>
  161. </label>
  162. </div>
  163. <div class="span3">
  164. <label>
  165. <h3><a href="./javascript.html#typeahead">Typeahead</a></h3>
  166. <p>A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.</p>
  167. </label>
  168. </div>
  169. <div class="span3">
  170. <label>
  171. <h3>Transitions <small class="muted">*</small></h3>
  172. <p>For simple transition effects, include bootstrap-transition.js once to slide in modals or fade out alerts.</p>
  173. <p class="muted"><strong>*</strong> Required for animation in plugins</p>
  174. </label>
  175. </div>
  176. </div> <!-- /row -->
  177. <div class="alert alert-info"><strong>Heads up!</strong> All javascript plugins require the latest version of jQuery.</div>
  178. </section>
  179. <!-- Modal
  180. ================================================== -->
  181. <section id="modals">
  182. <div class="page-header">
  183. <h1>Modals <small>bootstrap-modal.js</small></h1>
  184. </div>
  185. <div class="row">
  186. <div class="span3 columns">
  187. <h3>About modals</h3>
  188. <p>A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.</p>
  189. <a href="assets/js/bootstrap-modal.js" target="_blank" class="btn">Download file</a>
  190. </div>
  191. <div class="span9 columns">
  192. <h2>Static example</h2>
  193. <p>Below is a statically rendered modal.</p>
  194. <div class="well modal-example" style="background-color: #888; border: none;">
  195. <div class="modal" style="position: relative; top: auto; left: auto; margin: 0 auto; z-index: 1">
  196. <div class="modal-header">
  197. <a href="#" class="close" data-dismiss="modal">&times;</a>
  198. <h3>Modal header</h3>
  199. </div>
  200. <div class="modal-body">
  201. <p>One fine body…</p>
  202. </div>
  203. <div class="modal-footer">
  204. <a href="#" class="btn btn-primary">Save changes</a>
  205. <a href="#" class="btn">Close</a>
  206. </div>
  207. </div>
  208. </div> <!-- /well -->
  209. <h2>Live demo</h2>
  210. <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>
  211. <!-- sample modal content -->
  212. <div id="myModal" class="modal hide fade">
  213. <div class="modal-header">
  214. <a class="close" data-dismiss="modal" >&times;</a>
  215. <h3>Modal Heading</h3>
  216. </div>
  217. <div class="modal-body">
  218. <h4>Text in a modal</h4>
  219. <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem.</p>
  220. <h4>Popover in a modal</h4>
  221. <p>This <a href="#" class="btn popover-test" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">button</a> should trigger a popover on hover.</p>
  222. <h4>Tooltips in a modal</h4>
  223. <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>
  224. </div>
  225. <div class="modal-footer">
  226. <a href="#" class="btn btn-primary">Save changes</a>
  227. <a href="#" class="btn" data-dismiss="modal" >Close</a>
  228. </div>
  229. </div>
  230. <a data-toggle="modal" href="#myModal" class="btn btn-primary btn-large">Launch demo modal</a>
  231. <hr>
  232. <h2>Using bootstrap-modal</h2>
  233. <p>Call the modal via javascript:</p>
  234. <pre class="prettyprint linenums">$('#myModal').modal(options)</pre>
  235. <h3>Options</h3>
  236. <table class="table table-bordered table-striped">
  237. <thead>
  238. <tr>
  239. <th style="width: 100px;">Name</th>
  240. <th style="width: 50px;">type</th>
  241. <th style="width: 50px;">default</th>
  242. <th>description</th>
  243. </tr>
  244. </thead>
  245. <tbody>
  246. <tr>
  247. <td>backdrop</td>
  248. <td>boolean</td>
  249. <td>true</td>
  250. <td>Includes a modal-backdrop element</td>
  251. </tr>
  252. <tr>
  253. <td>keyboard</td>
  254. <td>boolean</td>
  255. <td>true</td>
  256. <td>Closes the modal when escape key is pressed</td>
  257. </tr>
  258. </tbody>
  259. </table>
  260. <h3>Markup</h3>
  261. <p>You can activate modals on your page easily without having to write a single line of javascript. Just set <code>data-toggle="modal"</code> on a controller element with a <code>data-target="#foo"</code> or <code>href="#foo"</code> which corresponds to a modal element id, and when clicked, it will launch your modal.</p>
  262. <p>Also, to add options to your modal instance, just include them as additional data attributes on either the control element or the modal markup itself.</p>
  263. <pre class="prettyprint linenums">
  264. &lt;a class="btn" data-toggle="modal" href="#myModal" &gt;Launch Modal&lt;/a&gt;
  265. </pre>
  266. <pre class="prettyprint linenums">
  267. &lt;div class="modal"&gt;
  268. &lt;div class="modal-header"&gt;
  269. &lt;a class="close" data-dismiss="modal"&gt;&times;&lt;/a&gt;
  270. &lt;h3&gt;Modal header&lt;/h3&gt;
  271. &lt;/div&gt;
  272. &lt;div class="modal-body"&gt;
  273. &lt;p&gt;One fine body…&lt;/p&gt;
  274. &lt;/div&gt;
  275. &lt;div class="modal-footer"&gt;
  276. &lt;a href="#" class="btn btn-primary"&gt;Save changes&lt;/a&gt;
  277. &lt;a href="#" class="btn"&gt;Close&lt;/a&gt;
  278. &lt;/div&gt;
  279. &lt;/div&gt;
  280. </pre>
  281. <div class="alert alert-info">
  282. <strong>Heads up!</strong> If you want your modal to animate in and out, just add a <code>.fade</code> class to the <code>.modal</code> element (refer to the demo to see this in action) and include bootstrap-transition.js.
  283. </div>
  284. <h3>Methods</h3>
  285. <h4>.modal(options)</h4>
  286. <p>Activates your content as a modal. Accepts an optional options <code>object</code>.</p>
  287. <pre class="prettyprint linenums">
  288. $('#myModal').modal({
  289. keyboard: false
  290. })</pre>
  291. <h4>.modal('toggle')</h4>
  292. <p>Manually toggles a modal.</p>
  293. <pre class="prettyprint linenums">$('#myModal').modal('toggle')</pre>
  294. <h4>.modal('show')</h4>
  295. <p>Manually opens a modal.</p>
  296. <pre class="prettyprint linenums">$('#myModal').modal('show')</pre>
  297. <h4>.modal('hide')</h4>
  298. <p>Manually hides a modal.</p>
  299. <pre class="prettyprint linenums">$('#myModal').modal('hide')</pre>
  300. <h3>Events</h3>
  301. <p>Bootstrap's modal class exposes a few events for hooking into modal functionality.</p>
  302. <table class="table table-bordered table-striped">
  303. <thead>
  304. <tr>
  305. <th style="width: 150px;">Event</th>
  306. <th>Description</th>
  307. </tr>
  308. </thead>
  309. <tbody>
  310. <tr>
  311. <td>show</td>
  312. <td>This event fires immediately when the <code>show</code> instance method is called.</td>
  313. </tr>
  314. <tr>
  315. <td>shown</td>
  316. <td>This event is fired when the modal has been made visible to the user (will wait for css transitions to complete).</td>
  317. </tr>
  318. <tr>
  319. <td>hide</td>
  320. <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
  321. </tr>
  322. <tr>
  323. <td>hidden</td>
  324. <td>This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).</td>
  325. </tr>
  326. </tbody>
  327. </table>
  328. <pre class="prettyprint linenums">
  329. $('#myModal').on('hidden', function () {
  330. // do something…
  331. })</pre>
  332. </div>
  333. </div>
  334. </section>
  335. <!-- Dropdown
  336. ================================================== -->
  337. <section id="dropdowns">
  338. <div class="page-header">
  339. <h1>Dropdowns <small>bootstrap-dropdown.js</small></h1>
  340. </div>
  341. <div class="row">
  342. <div class="span3 columns">
  343. <h3>About dropdowns</h3>
  344. <p>Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.</p>
  345. <a href="assets/js/bootstrap-dropdown.js" target="_blank" class="btn">Download file</a>
  346. </div>
  347. <div class="span9 columns">
  348. <h2>Examples</h2>
  349. <p>Click on the dropdown nav links in the navbar and pills below to test dropdowns.</p>
  350. <div id="navbar-example" class="navbar navbar-static">
  351. <div class="navbar-inner">
  352. <div class="container" style="width: auto;">
  353. <a class="brand" href="#">Project Name</a>
  354. <ul class="nav">
  355. <li class="dropdown">
  356. <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
  357. <ul class="dropdown-menu">
  358. <li><a href="#">Action</a></li>
  359. <li><a href="#">Another action</a></li>
  360. <li><a href="#">Something else here</a></li>
  361. <li class="divider"></li>
  362. <li><a href="#">Separated link</a></li>
  363. </ul>
  364. </li>
  365. <li class="dropdown">
  366. <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2 <b class="caret"></b></a>
  367. <ul class="dropdown-menu">
  368. <li><a href="#">Action</a></li>
  369. <li><a href="#">Another action</a></li>
  370. <li><a href="#">Something else here</a></li>
  371. <li class="divider"></li>
  372. <li><a href="#">Separated link</a></li>
  373. </ul>
  374. </li>
  375. </ul>
  376. <ul class="nav pull-right">
  377. <li id="fat-menu" class="dropdown">
  378. <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown 3 <b class="caret"></b></a>
  379. <ul class="dropdown-menu">
  380. <li><a href="#">Action</a></li>
  381. <li><a href="#">Another action</a></li>
  382. <li><a href="#">Something else here</a></li>
  383. <li class="divider"></li>
  384. <li><a href="#">Separated link</a></li>
  385. </ul>
  386. </li>
  387. </ul>
  388. </div>
  389. </div>
  390. </div> <!-- /navbar-example -->
  391. <ul class="nav nav-pills">
  392. <li class="active"><a href="#">Regular link</a></li>
  393. <li class="dropdown">
  394. <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a>
  395. <ul id="menu1" class="dropdown-menu">
  396. <li><a href="#">Action</a></li>
  397. <li><a href="#">Another action</a></li>
  398. <li><a href="#">Something else here</a></li>
  399. <li class="divider"></li>
  400. <li><a href="#">Separated link</a></li>
  401. </ul>
  402. </li>
  403. <li class="dropdown">
  404. <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown 2 <b class="caret"></b></a>
  405. <ul id="menu2" class="dropdown-menu">
  406. <li><a href="#">Action</a></li>
  407. <li><a href="#">Another action</a></li>
  408. <li><a href="#">Something else here</a></li>
  409. <li class="divider"></li>
  410. <li><a href="#">Separated link</a></li>
  411. </ul>
  412. </li>
  413. <li class="dropdown">
  414. <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown 3 <b class="caret"></b></a>
  415. <ul id="menu3" class="dropdown-menu">
  416. <li><a href="#">Action</a></li>
  417. <li><a href="#">Another action</a></li>
  418. <li><a href="#">Something else here</a></li>
  419. <li class="divider"></li>
  420. <li><a href="#">Separated link</a></li>
  421. </ul>
  422. </li>
  423. </ul> <!-- /tabs -->
  424. <hr>
  425. <h2>Using bootstrap-dropdown.js</h2>
  426. <p>Call the dropdowns via javascript:</p>
  427. <pre class="prettyprint linenums">$('.dropdown-toggle').dropdown()</pre>
  428. <h3>Markup</h3>
  429. <p>To quickly add dropdown functionality to any element just add <code>data-toggle="dropdown"</code> and any valid bootstrap dropdown will automatically be activated.</p>
  430. <div class="alert alert-info">
  431. <strong>Heads up!</strong> You may optionally target a specific dropdown by using <code>data-target="#fat"</code> or <code>href="#fat"</code>.
  432. </div>
  433. <pre class="prettyprint linenums">
  434. &lt;ul class="nav pills"&gt;
  435. &lt;li class="active"&gt;&lt;a href="#"&gt;Regular link&lt;/a&gt;&lt;/li&gt;
  436. &lt;li class="dropdown" id="menu1"&gt;
  437. &lt;a class="dropdown-toggle" data-toggle="dropdown" href="#menu1"&gt;
  438. Dropdown
  439. &lt;b class="caret"&gt;&lt;/b&gt;
  440. &lt;/a&gt;
  441. &lt;ul class="dropdown-menu"&gt;
  442. &lt;li&gt;&lt;a href="#"&gt;Action&lt;/a&gt;&lt;/li&gt;
  443. &lt;li&gt;&lt;a href="#"&gt;Another action&lt;/a&gt;&lt;/li&gt;
  444. &lt;li&gt;&lt;a href="#"&gt;Something else here&lt;/a&gt;&lt;/li&gt;
  445. &lt;li class="divider"&gt;&lt;/li&gt;
  446. &lt;li&gt;&lt;a href="#"&gt;Separated link&lt;/a&gt;&lt;/li&gt;
  447. &lt;/ul&gt;
  448. &lt;/li&gt;
  449. ...
  450. &lt;/ul&gt;</pre>
  451. <h3>Methods</h3>
  452. <h4>$().dropdown()</h4>
  453. <p>A programatic api for activating menus for a given navbar or tabbed navigation.</p>
  454. </div>
  455. </div>
  456. </section>
  457. <!-- ScrollSpy
  458. ================================================== -->
  459. <section id="scrollspy">
  460. <div class="page-header">
  461. <h1>ScrollSpy <small>bootstrap-scrollspy.js</small></h1>
  462. </div>
  463. <div class="row">
  464. <div class="span3 columns">
  465. <p>The ScrollSpy plugin is for automatically updating nav targets based on scroll position.</p>
  466. <a href="assets/js/bootstrap-scrollspy.js" target="_blank" class="btn">Download file</a>
  467. </div>
  468. <div class="span9 columns">
  469. <h2>Example navbar with scrollspy</h2>
  470. <p>Scroll the area below and watch the navigation update. The dropdown sub items will be highlighted as well. Try it!</p>
  471. <div id="navbarExample" class="navbar navbar-static">
  472. <div class="navbar-inner">
  473. <div class="container" style="width: auto;">
  474. <a class="brand" href="#">Project Name</a>
  475. <ul class="nav">
  476. <li><a href="#fat">@fat</a></li>
  477. <li><a href="#mdo">@mdo</a></li>
  478. <li class="dropdown">
  479. <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
  480. <ul class="dropdown-menu">
  481. <li><a href="#one">one</a></li>
  482. <li><a href="#two">two</a></li>
  483. <li class="divider"></li>
  484. <li><a href="#three">three</a></li>
  485. </ul>
  486. </li>
  487. </ul>
  488. </div>
  489. </div>
  490. </div>
  491. <div data-spy="scroll" data-target="#navbarExample" data-offset="0" class="scrollspy-example">
  492. <h4 id="fat">@fat</h4>
  493. <p>
  494. 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.
  495. </p>
  496. <h4 id="mdo">@mdo</h4>
  497. <p>
  498. 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.
  499. </p>
  500. <h4 id="one">one</h4>
  501. <p>
  502. 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.
  503. </p>
  504. <h4 id="two">two</h4>
  505. <p>
  506. 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.
  507. </p>
  508. <h4 id="three">three</h4>
  509. <p>
  510. 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.
  511. </p>
  512. <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.
  513. </p>
  514. </div>
  515. <hr>
  516. <h2>Using bootstrap-scrollspy.js</h2>
  517. <p>Call the scrollspy via javascript:</p>
  518. <pre class="prettyprint linenums">$('#navbar').scrollspy()</pre>
  519. <h3>Markup</h3>
  520. <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).</p>
  521. <pre class="prettyprint linenums">&lt;body data-spy="scroll" &gt;...&lt;/body&gt;</pre>
  522. <div class="alert alert-info">
  523. <strong>Heads up!</strong>
  524. 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>.
  525. </div>
  526. <h3>Options</h3>
  527. <table class="table table-bordered table-striped">
  528. <thead>
  529. <tr>
  530. <th style="width: 100px;">Name</th>
  531. <th style="width: 100px;">type</th>
  532. <th style="width: 50px;">default</th>
  533. <th>description</th>
  534. </tr>
  535. </thead>
  536. <tbody>
  537. <tr>
  538. <td>offset</td>
  539. <td>number</td>
  540. <td>10</td>
  541. <td>Pixels to offset from top when calculating position of scroll.</td>
  542. </tr>
  543. </tbody>
  544. </table>
  545. </div>
  546. </div>
  547. </section>
  548. <!-- Tabs
  549. ================================================== -->
  550. <section id="tabs">
  551. <div class="page-header">
  552. <h1>Togglable tabs <small>bootstrap-tab.js</small></h1>
  553. </div>
  554. <div class="row">
  555. <div class="span3 columns">
  556. <p>This plugin adds quick, dynamic tab and pill functionality for transitioning through local content.</p>
  557. <a href="assets/js/bootstrap-tab.js" target="_blank" class="btn">Download file</a>
  558. </div>
  559. <div class="span9 columns">
  560. <h2>Example tabs</h2>
  561. <p>Click the tabs below to toggle between hidden panes, even via dropdown menus.</p>
  562. <ul id="tab" class="nav nav-tabs">
  563. <li class="active"><a href="#home" data-toggle="tab">Home</a></li>
  564. <li><a href="#profile" data-toggle="tab">Profile</a></li>
  565. <li class="dropdown">
  566. <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
  567. <ul class="dropdown-menu">
  568. <li><a href="#dropdown1" data-toggle="tab">@fat</a></li>
  569. <li><a href="#dropdown2" data-toggle="tab">@mdo</a></li>
  570. </ul>
  571. </li>
  572. </ul>
  573. <div id="myTabContent" class="tab-content">
  574. <div class="tab-pane fade in active" id="home">
  575. <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>
  576. </div>
  577. <div class="tab-pane fade" id="profile">
  578. <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>
  579. </div>
  580. <div class="tab-pane fade" id="dropdown1">
  581. <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>
  582. </div>
  583. <div class="tab-pane fade" id="dropdown2">
  584. <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>
  585. </div>
  586. </div>
  587. <hr>
  588. <h2>Using bootstrap-tab.js</h2>
  589. <p>Enable tabbable tabs via javascript:</p>
  590. <pre class="prettyprint linenums">$('#myTab').tab('show')</pre>
  591. <h3>Markup</h3>
  592. <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.</p>
  593. <pre class="prettyprint linenums">
  594. &lt;ul class="tabs"&gt;
  595. &lt;li&gt;&lt;a href="#home" data-toggle="tab"&gt;Home&lt;/a&gt;&lt;/li&gt;
  596. &lt;li&gt;&lt;a href="#profile" data-toggle="tab"&gt;Profile&lt;/a&gt;&lt;/li&gt;
  597. &lt;li&gt;&lt;a href="#messages" data-toggle="tab"&gt;Messages&lt;/a&gt;&lt;/li&gt;
  598. &lt;li&gt;&lt;a href="#ettings" data-toggle="tab"&gt;Settings&lt;/a&gt;&lt;/li&gt;
  599. &lt;/ul&gt;</pre>
  600. <h3>Methods</h3>
  601. <h4>$().tab</h4>
  602. <p>
  603. Activates a tab element and content container. Tab should have either a `data-target` or an `href` targeting a container node in the dom.
  604. </p>
  605. <pre class="prettyprint linenums">
  606. &lt;ul class="tabs"&gt;
  607. &lt;li class="active"&gt;&lt;a href="#home"&gt;Home&lt;/a&gt;&lt;/li&gt;
  608. &lt;li&gt;&lt;a href="#profile"&gt;Profile&lt;/a&gt;&lt;/li&gt;
  609. &lt;li&gt;&lt;a href="#messages"&gt;Messages&lt;/a&gt;&lt;/li&gt;
  610. &lt;li&gt;&lt;a href="#settings"&gt;Settings&lt;/a&gt;&lt;/li&gt;
  611. &lt;/ul&gt;
  612. &lt;div class="tab-content"&gt;
  613. &lt;div class="tab-pane active" id="home"&gt;...&lt;/div&gt;
  614. &lt;div class="tab-pane" id="profile"&gt;...&lt;/div&gt;
  615. &lt;div class="tab-pane" id="messages"&gt;...&lt;/div&gt;
  616. &lt;div class="tab-pane" id="settings"&gt;...&lt;/div&gt;
  617. &lt;/div&gt;
  618. &lt;script&gt;
  619. $(function () {
  620. $('.tabs a:last').tab('show')
  621. })
  622. &lt;/script&gt;</pre>
  623. <h3>Events</h3>
  624. <table class="table table-bordered table-striped">
  625. <thead>
  626. <tr>
  627. <th style="width: 150px;">Event</th>
  628. <th>Description</th>
  629. </tr>
  630. </thead>
  631. <tbody>
  632. <tr>
  633. <td>show</td>
  634. <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>
  635. </tr>
  636. <tr>
  637. <td>shown</td>
  638. <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>
  639. </tr>
  640. </tbody>
  641. </table>
  642. <pre class="prettyprint linenums">
  643. $('a[data-toggle="tab"]').on('shown', function (e) {
  644. e.target // activated tab
  645. e.relatedTarget // previous tab
  646. })</pre>
  647. </div>
  648. </div>
  649. </section>
  650. <!-- Tooltips
  651. ================================================== -->
  652. <section id="tooltips">
  653. <div class="page-header">
  654. <h1>Tooltips <small>bootstrap-tooltip.js</small></h1>
  655. </div>
  656. <div class="row">
  657. <div class="span3 columns">
  658. <h3>About Tooltips</h3>
  659. <p>Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, uss css3 for animations, and data-attributes for local title storage.</p>
  660. <a href="assets/js/bootstrap-tooltip.js" target="_blank" class="btn">Download file</a>
  661. </div>
  662. <div class="span9 columns">
  663. <h2>Example use of Tooltips</h2>
  664. <p>Hover over the links below to see tooltips:</p>
  665. <div class="tooltip-demo well">
  666. <p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" rel='tooltip' title="first tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" rel='tooltip' title='Another tooltip'>have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A <a href="#" rel='tooltip' title='Another one here too'>really ironic</a> artisan whatever keytar, scenester farm-to-table banksy Austin <a href="#" rel='tooltip' title='The last tip!'>twitter handle</a> freegan cred raw denim single-origin coffee viral.
  667. </p>
  668. </div>
  669. <hr>
  670. <h2>Using bootstrap-tooltip.js</h2>
  671. <p>Trigger the tooltip via javascript:</p>
  672. <pre class="prettyprint linenums">$('#example').tooltip(options)</pre>
  673. <h3>Options</h3>
  674. <table class="table table-bordered table-striped">
  675. <thead>
  676. <tr>
  677. <th style="width: 100px;">Name</th>
  678. <th style="width: 100px;">type</th>
  679. <th style="width: 50px;">default</th>
  680. <th>description</th>
  681. </tr>
  682. </thead>
  683. <tbody>
  684. <tr>
  685. <td>animation</td>
  686. <td>boolean</td>
  687. <td>true</td>
  688. <td>apply a css fade transition to the tooltip</td>
  689. </tr>
  690. <tr>
  691. <td>placement</td>
  692. <td>string</td>
  693. <td>'top'</td>
  694. <td>how to position the tooltip - top | bottom | left | right</td>
  695. </tr>
  696. <tr>
  697. <td>selector</td>
  698. <td>string</td>
  699. <td>false</td>
  700. <td>If a selector is provided, tooltip objects will be delegated to the specified targets.</td>
  701. </tr>
  702. <tr>
  703. <td>title</td>
  704. <td>string | function</td>
  705. <td>''</td>
  706. <td>default title value if `title` tag isn't present</td>
  707. </tr>
  708. <tr>
  709. <td>trigger</td>
  710. <td>string</td>
  711. <td>'hover'</td>
  712. <td>how tooltip is triggered - hover | focus | manual</td>
  713. </tr>
  714. <tr>
  715. <td>delay</td>
  716. <td>number | object</td>
  717. <td>0</td>
  718. <td>
  719. <p>delay showing and hiding the tooltip (ms)</p>
  720. <p>If a number is supplied, delay is applied to both hide/show</p>
  721. <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
  722. </td>
  723. </tr>
  724. </tbody>
  725. </table>
  726. <div class="alert alert-info">
  727. <strong>Heads up!</strong>
  728. Options for individual tooltips can alternatively be specified through the use of data attributes.
  729. </div>
  730. <h3>Markup</h3>
  731. <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>
  732. <h3>Methods</h3>
  733. <h4>$().tooltip(options)</h4>
  734. <p>Attaches a tooltip handler to an element collection.</p>
  735. <h4>.tooltip('show')</h4>
  736. <p>Reveals an elements tooltip.</p>
  737. <pre class="prettyprint linenums">$('#element').tooltip('show')</pre>
  738. <h4>.tooltip('hide')</h4>
  739. <p>Hides an elements tooltip.</p>
  740. <pre class="prettyprint linenums">$('#element').tooltip('hide')</pre>
  741. <h4>.tooltip('toggle')</h4>
  742. <p>Toggles an elements tooltip.</p>
  743. <pre class="prettyprint linenums">$('#element').tooltip('toggle')</pre>
  744. </div>
  745. </div>
  746. </section>
  747. <!-- Popovers
  748. ================================================== -->
  749. <section id="popovers">
  750. <div class="page-header">
  751. <h1>Popovers <small>bootstrap-popover.js</small></h1>
  752. </div>
  753. <div class="row">
  754. <div class="span3 columns">
  755. <h3>About popovers</h3>
  756. <p>Add small overlays of content, like those on the iPad, to any element for housing secondary information.</p>
  757. <p class="muted"><strong>*</strong> Requires <a href="#tooltip">Tooltip</a> to be included</p>
  758. <a href="assets/js/bootstrap-popover.js" target="_blank" class="btn">Download file</a>
  759. </div>
  760. <div class="span9 columns">
  761. <h2>Example hover popover</h2>
  762. <p>Hover over the button to trigger the popover.</p>
  763. <div class="well">
  764. <a href="#" class="btn btn-danger" rel="popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">hover for popover</a>
  765. </div>
  766. <hr>
  767. <h2>Using bootstrap-popover.js</h2>
  768. <p>Enable popovers via javascript:</p>
  769. <pre class="prettyprint linenums">$('#example').popover(options)</pre>
  770. <h3>Options</h3>
  771. <table class="table table-bordered table-striped">
  772. <thead>
  773. <tr>
  774. <th style="width: 100px;">Name</th>
  775. <th style="width: 100px;">type</th>
  776. <th style="width: 50px;">default</th>
  777. <th>description</th>
  778. </tr>
  779. </thead>
  780. <tbody>
  781. <tr>
  782. <td>animation</td>
  783. <td>boolean</td>
  784. <td>true</td>
  785. <td>apply a css fade transition to the tooltip</td>
  786. </tr>
  787. <tr>
  788. <td>placement</td>
  789. <td>string</td>
  790. <td>'right'</td>
  791. <td>how to position the popover - top | bottom | left | right</td>
  792. </tr>
  793. <tr>
  794. <td>selector</td>
  795. <td>string</td>
  796. <td>false</td>
  797. <td>if a selector is provided, tooltip objects will be delegated to the specified targets</td>
  798. </tr>
  799. <tr>
  800. <td>trigger</td>
  801. <td>string</td>
  802. <td>'hover'</td>
  803. <td>how tooltip is triggered - hover | focus | manual</td>
  804. </tr>
  805. <tr>
  806. <td>title</td>
  807. <td>string | function</td>
  808. <td>''</td>
  809. <td>default title value if `title` attribute isn't present</td>
  810. </tr>
  811. <tr>
  812. <td>content</td>
  813. <td>string | function</td>
  814. <td>''</td>
  815. <td>default content value if `data-content` attribute isn't present</td>
  816. </tr>
  817. <tr>
  818. <td>delay</td>
  819. <td>number | object</td>
  820. <td>0</td>
  821. <td>
  822. <p>delay showing and hiding the popover (ms)</p>
  823. <p>If a number is supplied, delay is applied to both hide/show</p>
  824. <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
  825. </td>
  826. </tr>
  827. </tbody>
  828. </table>
  829. <div class="alert alert-info">
  830. <strong>Heads up!</strong>
  831. Options for individual popovers can alternatively be specified through the use of data attributes.
  832. </div>
  833. <h3>Markup</h3>
  834. <p>
  835. For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a the selector option.
  836. </p>
  837. <h3>Methods</h3>
  838. <h4>$().popover(options)</h4>
  839. <p>Initializes popovers for an element collection.</p>
  840. <h4>.popover('show')</h4>
  841. <p>Reveals an elements popover.</p>
  842. <pre class="prettyprint linenums">$('#element').popover('show')</pre>
  843. <h4>.popover('hide')</h4>
  844. <p>Hides an elements popover.</p>
  845. <pre class="prettyprint linenums">$('#element').popover('hide')</pre>
  846. <h4>.popover('toggle')</h4>
  847. <p>Toggles an elements popover.</p>
  848. <pre class="prettyprint linenums">$('#element').popover('toggle')</pre>
  849. </div>
  850. </div>
  851. </section>
  852. <!-- Alert
  853. ================================================== -->
  854. <section id="alerts">
  855. <div class="page-header">
  856. <h1>Alert messages <small>bootstrap-alert.js</small></h1>
  857. </div>
  858. <div class="row">
  859. <div class="span3 columns">
  860. <h3>About alerts</h3>
  861. <p>The alert plugin is a tiny class for adding close functionality to alerts.</p>
  862. <a href="assets/js/bootstrap-alert.js" target="_blank" class="btn">Download</a>
  863. </div>
  864. <div class="span9 columns">
  865. <h2>Example alerts</h2>
  866. <p>The alerts plugin works on regular alert messages, and block messages.</p>
  867. <div class="alert fade in">
  868. <a class="close" data-dismiss="alert" href="#">&times;</a>
  869. <strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
  870. </div>
  871. <div class="alert alert-block alert-error fade in">
  872. <a class="close" data-dismiss="alert" href="#">&times;</a>
  873. <h4 class="alert-heading">Oh snap! You got an error!</h4>
  874. <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>
  875. <p>
  876. <a class="btn btn-danger small" href="#">Take this action</a> <a class="btn small" href="#">Or do this</a>
  877. </p>
  878. </div>
  879. <hr>
  880. <h2>Using bootstrap-alerts.js</h2>
  881. <p>Enable dismissal of an alert via javascript:</p>
  882. <pre class="prettyprint linenums">$(".alert-message").alert()</pre>
  883. <h3>Markup</h3>
  884. <p>Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert close functionality.</p>
  885. <pre class="prettyprint linenums">&lt;a class="close" data-dismiss="alert" href="#"&gt;&amp;times;&lt;/a&gt;</pre>
  886. <h3>Methods</h3>
  887. <h4>$().alert()</h4>
  888. <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>
  889. <h4>.alert('close')</h4>
  890. <p>Closes an alert.</p>
  891. <pre class="prettyprint linenums">$(".alert-message").alert('close')</pre>
  892. <h3>Events</h3>
  893. <p>Bootstrap's alert class exposes a few events for hooking into alert functionality.</p>
  894. <table class="table table-bordered table-striped">
  895. <thead>
  896. <tr>
  897. <th style="width: 150px;">Event</th>
  898. <th>Description</th>
  899. </tr>
  900. </thead>
  901. <tbody>
  902. <tr>
  903. <td>close</td>
  904. <td>This event fires immediately when the <code>close</code> instance method is called.</td>
  905. </tr>
  906. <tr>
  907. <td>closed</td>
  908. <td>This event is fired when the alert has been closed (will wait for css transitions to complete).</td>
  909. </tr>
  910. </tbody>
  911. </table>
  912. <pre class="prettyprint linenums">
  913. $('#my-alert').bind('closed', function () {
  914. // do something…
  915. })</pre>
  916. </div>
  917. </div>
  918. </section>
  919. <!-- Buttons
  920. ================================================== -->
  921. <section id="buttons">
  922. <div class="page-header">
  923. <h1>Buttons <small>bootstrap-button.js</small></h1>
  924. </div>
  925. <div class="row">
  926. <div class="span3 columns">
  927. <h3>About</h3>
  928. <p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p>
  929. <a href="assets/js/bootstrap-button.js" target="_blank" class="btn">Download file</a>
  930. </div>
  931. <div class="span9 columns">
  932. <h2>Example uses</h2>
  933. <p>Use the buttons plugin for states and toggles.</p>
  934. <table class="table table-bordered table-striped">
  935. <tbody>
  936. <tr>
  937. <td>Stateful</td>
  938. <td>
  939. <button id="fat-btn" data-loading-text="loading..." class="btn btn-primary">
  940. Loading State
  941. </button>
  942. </td>
  943. </tr>
  944. <tr>
  945. <td>Single toggle</td>
  946. <td>
  947. <button class="btn btn-primary" data-toggle="button">Single Toggle</button>
  948. </td>
  949. </tr>
  950. <tr>
  951. <td>Checkbox</td>
  952. <td>
  953. <div class="btn-group" data-toggle="buttons-checkbox">
  954. <button class="btn btn-primary">Left</button>
  955. <button class="btn btn-primary">Middle</button>
  956. <button class="btn btn-primary">Right</button>
  957. </div>
  958. </td>
  959. </tr>
  960. <tr>
  961. <td>Radio</td>
  962. <td>
  963. <div class="btn-group" data-toggle="buttons-radio">
  964. <button class="btn btn-primary">Left</button>
  965. <button class="btn btn-primary">Middle</button>
  966. <button class="btn btn-primary">Right</button>
  967. </div>
  968. </td>
  969. </tr>
  970. </tbody>
  971. </table>
  972. <hr>
  973. <h2>Using bootstrap-button.js</h2>
  974. <p>Enable buttons via javascript:</p>
  975. <pre class="prettyprint linenums">$('.tabs').button()</pre>
  976. <h3>Markup</h3>
  977. <p>Data attributes are integral to the button plugin. Check out the example code below for the various markup types.</p>
  978. <pre class="prettyprint linenums">
  979. &lt;!-- Add data-toggle="button" to activate toggling on a single button --&gt;
  980. &lt;button class="btn" data-toggle="button"&gt;Single Toggle&lt;/button&gt;
  981. &lt;!-- Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group --&gt;
  982. &lt;div class="btn-group" data-toggle="buttons-checkbox"&gt;
  983. &lt;button class="btn"&gt;Left&lt;/button&gt;
  984. &lt;button class="btn"&gt;Middle&lt;/button&gt;
  985. &lt;button class="btn"&gt;Right&lt;/button&gt;
  986. &lt;/div&gt;
  987. &lt;!-- Add data-toggle="buttons-radio" for radio style toggling on btn-group --&gt;
  988. &lt;div class="btn-group" data-toggle="buttons-radio"&gt;
  989. &lt;button class="btn"&gt;Left&lt;/button&gt;
  990. &lt;button class="btn"&gt;Middle&lt;/button&gt;
  991. &lt;button class="btn"&gt;Right&lt;/button&gt;
  992. &lt;/div&gt;
  993. </pre>
  994. <h3>Methods</h3>
  995. <h4>$().button('toggle')</h4>
  996. <p>Toggles push state. Gives btn the look that it's been activated.</p>
  997. <div class="alert alert-info">
  998. <strong>Heads up!</strong>
  999. You can enable auto toggling of a button by using the <code>data-toggle</code> attribute.
  1000. </div>
  1001. <pre class="prettyprint linenums">&lt;button class="btn" data-toggle="button" &gt;…&lt;/button&gt;</pre>
  1002. <h4>$().button('loading')</h4>
  1003. <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>.
  1004. </p>
  1005. <pre class="prettyprint linenums">&lt;button class="btn" data-loading-text="loading stuff..." &gt;...&lt;/button&gt;</pre>
  1006. <div class="alert alert-info">
  1007. <strong>Heads up!</strong>
  1008. <a href="https://github.com/twitter/bootstrap/issues/793">Firefox persists the disabled state across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.
  1009. </div>
  1010. <h4>$().button('reset')</h4>
  1011. <p>Resets button state - swaps text to original text.</p>
  1012. <h4>$().button(string)</h4>
  1013. <p>Resets button state - swaps text to any data defined text state.</p>
  1014. <pre class="prettyprint linenums">&lt;button class="btn" data-complete-text="finished!" &gt;...&lt;/button&gt;
  1015. &lt;script&gt;
  1016. $('.btn').button('complete')
  1017. &lt;/script&gt;</pre>
  1018. </div>
  1019. </div>
  1020. </section>
  1021. <!-- Collapse
  1022. ================================================== -->
  1023. <section id="collapse">
  1024. <div class="page-header">
  1025. <h1>Collapse <small>bootstrap-collapse.js</small></h1>
  1026. </div>
  1027. <div class="row">
  1028. <div class="span3 columns">
  1029. <h3>About</h3>
  1030. <p>Get base styles and flexible support for collapsible components like accordions and navigation.</p>
  1031. <a href="assets/js/bootstrap-collapse.js" target="_blank" class="btn">Download file</a>
  1032. </div>
  1033. <div class="span9 columns">
  1034. <h2>Example accordion</h2>
  1035. <p>Using the collapse plugin, we built a simple accordion style widget:</p>
  1036. <div class="accordion" id="accordion2">
  1037. <div class="accordion-group">
  1038. <div class="accordion-heading">
  1039. <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
  1040. Collapsible Group Item #1
  1041. </a>
  1042. </div>
  1043. <div id="collapseOne" class="accordion-body collapse in">
  1044. <div class="accordion-inner">
  1045. 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.
  1046. </div>
  1047. </div>
  1048. </div>
  1049. <div class="accordion-group">
  1050. <div class="accordion-heading">
  1051. <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
  1052. Collapsible Group Item #2
  1053. </a>
  1054. </div>
  1055. <div id="collapseTwo" class="accordion-body collapse">
  1056. <div class="accordion-inner">
  1057. 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.
  1058. </div>
  1059. </div>
  1060. </div>
  1061. <div class="accordion-group">
  1062. <div class="accordion-heading">
  1063. <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree">
  1064. Collapsible Group Item #3
  1065. </a>
  1066. </div>
  1067. <div id="collapseThree" class="accordion-body collapse">
  1068. <div class="accordion-inner">
  1069. 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.
  1070. </div>
  1071. </div>
  1072. </div>
  1073. </div>
  1074. <hr>
  1075. <h2>Using bootstrap-collapse.js</h2>
  1076. <p>Enable via javascript:</p>
  1077. <pre class="prettyprint linenums">$(".collapse").collapse()</pre>
  1078. <h3>Options</h3>
  1079. <table class="table table-bordered table-striped">
  1080. <thead>
  1081. <tr>
  1082. <th style="width: 100px;">Name</th>
  1083. <th style="width: 50px;">type</th>
  1084. <th style="width: 50px;">default</th>
  1085. <th>description</th>
  1086. </tr>
  1087. </thead>
  1088. <tbody>
  1089. <tr>
  1090. <td>parent</td>
  1091. <td>selector</td>
  1092. <td>false</td>
  1093. <td>If selector then all collapsible elements under the specified parent will be closed when this collasabile item is shown. (similar to traditional accordion behavior)</td>
  1094. </tr>
  1095. <tr>
  1096. <td>toggle</td>
  1097. <td>boolean</td>
  1098. <td>true</td>
  1099. <td>Toggles the collapsible element on invocation</td>
  1100. </tr>
  1101. </tbody>
  1102. </table>
  1103. <h3>Markup</h3>
  1104. <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>
  1105. <pre class="prettyprint linenums">
  1106. &lt;button class="btn btn-danger" data-toggle="collapse" data-target="#demo"&gt;
  1107. simple collapsible
  1108. &lt;/button&gt;
  1109. &lt;div id="demo" class="collapse in"&gt; … &lt;/div&gt;</pre>
  1110. <div class="alert alert-info">
  1111. <strong>Heads up!</strong>
  1112. 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.
  1113. </div>
  1114. <h3>Methods</h3>
  1115. <h4>.collapse(options)</h4>
  1116. <p>Activates your content as a collapsible element. Accepts an optional options <code>object</code>.
  1117. <pre class="prettyprint linenums">
  1118. $('#myCollapsible').collapse({
  1119. toggle: false
  1120. })</pre>
  1121. <h4>.collapse('toggle')</h4>
  1122. <p>Toggles a collapsible element to shown or hidden.</p>
  1123. <h4>.collapse('show')</h4>
  1124. <p>Shows a collapsible element.</p>
  1125. <h4>.collapse('hide')</h4>
  1126. <p>Hides a collapsible element.</p>
  1127. <h3>Events</h3>
  1128. <p>
  1129. Bootstrap's collapse class exposes a few events for hooking into collapse functionality.
  1130. </p>
  1131. <table class="table table-bordered table-striped">
  1132. <thead>
  1133. <tr>
  1134. <th style="width: 150px;">Event</th>
  1135. <th>Description</th>
  1136. </tr>
  1137. </thead>
  1138. <tbody>
  1139. <tr>
  1140. <td>show</td>
  1141. <td>This event fires immediately when the <code>show</code> instance method is called.</td>
  1142. </tr>
  1143. <tr>
  1144. <td>shown</td>
  1145. <td>This event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).</td>
  1146. </tr>
  1147. <tr>
  1148. <td>hide</td>
  1149. <td>
  1150. This event is fired immediately when the <code>hide</code> method has been called.
  1151. </td>
  1152. </tr>
  1153. <tr>
  1154. <td>hidden</td>
  1155. <td>This event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).</td>
  1156. </tr>
  1157. </tbody>
  1158. </table>
  1159. <pre class="prettyprint linenums">
  1160. $('#myCollapsible').on('hidden', function () {
  1161. // do something…
  1162. })</pre>
  1163. </div>
  1164. </div>
  1165. </section>
  1166. <!-- Carousel
  1167. ================================================== -->
  1168. <section id="carousel">
  1169. <div class="page-header">
  1170. <h1>Carousel <small>bootstrap-carousel.js</small></h1>
  1171. </div>
  1172. <div class="row">
  1173. <div class="span3 columns">
  1174. <h3>About</h3>
  1175. <p>A generic plugin for cycling through elements. A merry-go-round.</p>
  1176. <a href="assets/js/bootstrap-carousel.js" target="_blank" class="btn">Download file</a>
  1177. </div>
  1178. <div class="span9 columns">
  1179. <h2>Example carousel</h2>
  1180. <p>Watch the slideshow below.</p>
  1181. <div id="myCarousel" class="carousel slide">
  1182. <div class="carousel-inner">
  1183. <div class="item active">
  1184. <img src="assets/img/bootstrap-mdo-sfmoma-01.jpg" alt="">
  1185. <div class="carousel-caption">
  1186. <h4>First Thumbnail label</h4>
  1187. <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>
  1188. </div>
  1189. </div>
  1190. <div class="item">
  1191. <img src="assets/img/bootstrap-mdo-sfmoma-02.jpg" alt="">
  1192. <div class="carousel-caption">
  1193. <h4>Second Thumbnail label</h4>
  1194. <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>
  1195. </div>
  1196. </div>
  1197. <div class="item">
  1198. <img src="assets/img/bootstrap-mdo-sfmoma-03.jpg" alt="">
  1199. <div class="carousel-caption">
  1200. <h4>Third Thumbnail label</h4>
  1201. <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>
  1202. </div>
  1203. </div>
  1204. </div>
  1205. <a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a>
  1206. <a class="right carousel-control" href="#myCarousel" data-slide="next">&rsaquo;</a>
  1207. </div>
  1208. <div class="alert alert-info">
  1209. <strong>Heads up!</strong>
  1210. When implementing this carousel, remove the images we have provided and replace them with your own.
  1211. </div>
  1212. <hr>
  1213. <h2>Using bootstrap-carousel.js</h2>
  1214. <p>Call via javascript:</p>
  1215. <pre class="prettyprint linenums">$('.carousel').carousel()</pre>
  1216. <h3>Options</h3>
  1217. <table class="table table-bordered table-striped">
  1218. <thead>
  1219. <tr>
  1220. <th style="width: 100px;">Name</th>
  1221. <th style="width: 50px;">type</th>
  1222. <th style="width: 50px;">default</th>
  1223. <th>description</th>
  1224. </tr>
  1225. </thead>
  1226. <tbody>
  1227. <tr>
  1228. <td>interval</td>
  1229. <td>number</td>
  1230. <td>5000</td>
  1231. <td>The amount of time to delay between automatically cycling an item.</td>
  1232. </tr>
  1233. </tbody>
  1234. </table>
  1235. <h3>Markup</h3>
  1236. <p>Data attributes are integral to the carousel plugin. Check out the example code below for the various markup types.</p>
  1237. <pre class="prettyprint linenums">
  1238. &lt;div class="carousel"&gt;
  1239. &lt;!-- Carousel items --&gt;
  1240. &lt;div class="carousel-inner"&gt;
  1241. ...
  1242. &lt;/div&gt;
  1243. &lt;!-- Carousel nav --&gt;
  1244. &lt;a class="carousel-control left" href="#myCarousel" data-slide="prev"&gt;&amp;lsaquo;&lt;/a&gt;
  1245. &lt;a class="carousel-control right" href="#myCarousel" data-slide="next"&gt;&amp;rsaquo;&lt;/a&gt;
  1246. &lt;/div&gt;
  1247. </pre>
  1248. <h3>Methods</h3>
  1249. <h4>.carousel(options)</h4>
  1250. <p>Initializes the carousel with an optional options <code>object</code> and starts cycling through items.</p>
  1251. <pre class="prettyprint linenums">
  1252. $('.myCarousel').carousel({
  1253. interval: 2000
  1254. })
  1255. </pre>
  1256. <h4>.carousel('cycle')</h4>
  1257. <p>Cycles through the carousel items from left to right.</p>
  1258. <h4>.carousel('pause')</h4>
  1259. <p>Stops the carousel from cycling through items.</p>
  1260. <h4>.carousel(number)</h4>
  1261. <p>Cycles the carousel to a particular frame (0 based, similar to an array).</p>
  1262. <h4>.carousel('prev')</h4>
  1263. <p>Cycles to the previous item.</p>
  1264. <h4>.carousel('next')</h4>
  1265. <p>Cycles to the next item.</p>
  1266. <h3>Events</h3>
  1267. <p>Bootstrap's modal class exposes a few events for hooking into modal functionality.</p>
  1268. <table class="table table-bordered table-striped">
  1269. <thead>
  1270. <tr>
  1271. <th style="width: 150px;">Event</th>
  1272. <th>Description</th>
  1273. </tr>
  1274. </thead>
  1275. <tbody>
  1276. <tr>
  1277. <td>slide</td>
  1278. <td>This event fires immediately when the <code>slide</code> instance method is invoked.</td>
  1279. </tr>
  1280. <tr>
  1281. <td>slid</td>
  1282. <td>This event is fired when the carousel has completed it's slide transition.</td>
  1283. </tr>
  1284. </tbody>
  1285. </table>
  1286. </div>
  1287. </div>
  1288. </section>
  1289. <!-- Typeahead
  1290. ================================================== -->
  1291. <section id="typeahead">
  1292. <div class="page-header">
  1293. <h1>Typeahead <small>bootstrap-typeahead.js</small></h1>
  1294. </div>
  1295. <div class="row">
  1296. <div class="span3 columns">
  1297. <h3>About</h3>
  1298. <p>A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.</p>
  1299. <a href="assets/js/bootstrap-typeahead.js" target="_blank" class="btn">Download file</a>
  1300. </div>
  1301. <div class="span9 columns">
  1302. <h2>Example</h2>
  1303. <p>Start typing in the field below to show the typeahead results.</p>
  1304. <div class="well">
  1305. <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"]'>
  1306. </div>
  1307. <hr>
  1308. <h2>Using bootstrap-typeahead.js</h2>
  1309. <p>Call the typeahead via javascript:</p>
  1310. <pre class="prettyprint linenums">$('.typeahead').typeahead()</pre>
  1311. <h3>Options</h3>
  1312. <table class="table table-bordered table-striped">
  1313. <thead>
  1314. <tr>
  1315. <th style="width: 100px;">Name</th>
  1316. <th style="width: 50px;">type</th>
  1317. <th style="width: 100px;">default</th>
  1318. <th>description</th>
  1319. </tr>
  1320. </thead>
  1321. <tbody>
  1322. <tr>
  1323. <td>source</td>
  1324. <td>array</td>
  1325. <td>[ ]</td>
  1326. <td>The data source to query against.</td>
  1327. </tr>
  1328. <tr>
  1329. <td>items</td>
  1330. <td>number</td>
  1331. <td>8</td>
  1332. <td>The max number of items to display in the dropdown.</td>
  1333. </tr>
  1334. <tr>
  1335. <td>matcher</td>
  1336. <td>function</td>
  1337. <td>case insensitive</td>
  1338. <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>
  1339. </tr>
  1340. <tr>
  1341. <td>sorter</td>
  1342. <td>function</td>
  1343. <td>exact match,<br> case sensitive,<br> case insensitive</td>
  1344. <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>
  1345. </tr>
  1346. <tr>
  1347. <td>highlighter</td>
  1348. <td>function</td>
  1349. <td>highlights all default matches</td>
  1350. <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>
  1351. </tr>
  1352. </tbody>
  1353. </table>
  1354. <h3>Markup</h3>
  1355. <p>Add data attributes to register an element with typeahead functionality.</p>
  1356. <pre class="prettyprint linenums">
  1357. &lt;input type="text" data-provide="typeahead"&gt;
  1358. </pre>
  1359. <h3>Methods</h3>
  1360. <h4>.typeahead(options)</h4>
  1361. <p>Initializes an input with a typahead.</p>
  1362. </div>
  1363. </div>
  1364. </section>
  1365. <!-- Footer
  1366. ================================================== -->
  1367. <footer class="footer">
  1368. <p class="pull-right"><a href="#">Back to top</a></p>
  1369. <p>Designed and built with all the love in the world <a href="http://twitter.com/twitter" target="_blank">@twitter</a> by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p>
  1370. <p>Code licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
  1371. <p>Icons from <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>
  1372. </footer>
  1373. </div><!-- /container -->
  1374. <!-- Le javascript
  1375. ================================================== -->
  1376. <!-- Placed at the end of the document so the pages load faster -->
  1377. <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
  1378. <script src="assets/js/jquery.js"></script>
  1379. <script src="assets/js/google-code-prettify/prettify.js"></script>
  1380. <script src="assets/js/bootstrap-transition.js"></script>
  1381. <script src="assets/js/bootstrap-alert.js"></script>
  1382. <script src="assets/js/bootstrap-modal.js"></script>
  1383. <script src="assets/js/bootstrap-dropdown.js"></script>
  1384. <script src="assets/js/bootstrap-scrollspy.js"></script>
  1385. <script src="assets/js/bootstrap-tab.js"></script>
  1386. <script src="assets/js/bootstrap-tooltip.js"></script>
  1387. <script src="assets/js/bootstrap-popover.js"></script>
  1388. <script src="assets/js/bootstrap-button.js"></script>
  1389. <script src="assets/js/bootstrap-collapse.js"></script>
  1390. <script src="assets/js/bootstrap-carousel.js"></script>
  1391. <script src="assets/js/bootstrap-typeahead.js"></script>
  1392. <script src="assets/js/application.js"></script>
  1393. <!-- Analytics
  1394. ================================================== -->
  1395. <script>
  1396. var _gauges = _gauges || [];
  1397. (function() {
  1398. var t = document.createElement('script');
  1399. t.type = 'text/javascript';
  1400. t.async = true;
  1401. t.id = 'gauges-tracker';
  1402. t.setAttribute('data-site-id', '4f0dc9fef5a1f55508000013');
  1403. t.src = '//secure.gaug.es/track.js';
  1404. var s = document.getElementsByTagName('script')[0];
  1405. s.parentNode.insertBefore(t, s);
  1406. })();
  1407. </script>
  1408. </body>
  1409. </html>