Bring Bootstrap's components to life with new, custom plugins that work with <ahref="http://jquery.com/"target="_blank">jQuery</a> and <ahref="http://ender.no.de"target="_blank">Ender</a>.
</p>
<p><ahref="./index.html">← Back to Bootstrap home</a></p>
<p>Our Modal plugin is a super slim take on the traditional modal js plugin, taking special care to include only the bare functionality that we require here at twitter.</p>
<td>Includes a modal-backdrop element. Set backdrop to <code>"static"</code> if you do not want the modal closed when the backdrop is clicked.</td>
</tr>
<tr>
<td>keyboard</td>
<td>boolean</td>
<td>false</td>
<td>Closes the modal when escape key is pressed</td>
</tr>
<tr>
<td>show</td>
<td>boolean</td>
<td>false</td>
<td>Opens modal on class initialization</td>
</tr>
</tbody>
</table>
<h3>Markup</h3>
<p>You can activate modals on your page easily without having to write a single line of javascript. Just give an element a <code>data-controls-modal</code> attribute which corresponds to a modal element id, and when clicked, it will launch your modal. To add modal options, just include them as data attributes as well.</p>
<p><spanclass="label notice">Notice</span> If you want your modal to animate in and out, just add a <code>.fade</code> class to your <code>.modal</code> element (refer to the demo to see this in action).</p>
<h3>Methods</h3>
<h4>.modal(options)</h4>
<p>Activates your content as a modal. Accepts an optional options <code>object</code>.
<p>To quickly add dropdown functionality to any nav element, use the <code>data-dropdown</code> attribute. Any valid bootstrap dropdown will automatically be activated.</p>
<p><spanclass="label notice">Notice</span> If your ui has several dropdowns, consider adding the <code>data-dropdown</code> attribute to a more significant container element like <code>.tabs</code> or <code>.topbar</code>.
<h3>Methods</h3>
<h4>$().dropdown()</h4>
<p>
A programatic api for activating menus for a given topbar or tabbed navigation.
<p><spanclass="label notice">Notice</span> Topbar anchor tags must have resolvable id targets. For example, a <code><a href="#home">home</a></code> must correspond to something in the dom like <code><div id="home"></div></code>.
</p>
<h4>.scrollSpy('refresh')</h4>
<p>The scrollspy caches nav buttons and section coordinates for performance. If you need to update this cache (likely if you have dynamic content) just call this refresh method. If you used the data attribute to define your scrollspy, just call refresh on the body.</p>
<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>.
<p>You can activate a tab or pill navigation without writing any javascript by simply giving them a <code>data-tabs</code> or <code>data-pills</code> attribute.</p>
<td>This event fires on tab change. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab respectively.</td>
</tr>
</tbody>
</table>
<preclass="prettyprint linenums">
$('#.tabs').bind('change', function (e) {
e.target // activated tab
e.relatedTarget // previous tab
})</pre>
<h3>Demo</h3>
<ulclass="tabs"data-tabs="tabs">
<liclass="active"><ahref="#home">Home</a></li>
<li><ahref="#profile">Profile</a></li>
<li><ahref="#messages">Messages</a></li>
<li><ahref="#settings">Settings</a></li>
<liclass="dropdown"data-dropdown="dropdown">
<ahref="#"class="dropdown-toggle">Dropdown</a>
<ulclass="dropdown-menu">
<li><ahref="#fat">@fat</a></li>
<li><ahref="#mdo">@mdo</a></li>
</ul>
</li>
</ul>
<divid="my-tab-content"class="tab-content">
<divclass="active tab-pane"id="home">
<p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
</div>
<divclass="tab-pane"id="profile">
<p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
</div>
<divclass="tab-pane"id="messages">
<p>Banksy do proident, brooklyn photo booth delectus sunt artisan sed organic exercitation eiusmod four loko. Quis tattooed iphone esse aliqua. Master cleanse vero fixie mcsweeney's. Ethical portland aute, irony food truck pitchfork lomo eu anim. Aesthetic blog DIY, ethical beard leggings tofu consequat whatever cardigan nostrud. Helvetica you probably haven't heard of them carles, marfa veniam occaecat lomo before they sold out in shoreditch scenester sustainable thundercats. Consectetur tofu craft beer, mollit brunch fap echo park pitchfork mustache dolor.</p>
</div>
<divclass="tab-pane"id="settings">
<p>Sunt qui biodiesel mollit officia, fanny pack put a bird on it thundercats seitan squid ad wolf bicycle rights blog. Et aute readymade farm-to-table carles 8-bit, nesciunt nulla etsy adipisicing organic ea. Master cleanse mollit high life, next level Austin nesciunt american apparel twee mustache adipisicing reprehenderit hoodie portland irony. Aliqua tofu quinoa +1 commodo eiusmod. High life williamsburg cupidatat twee homo leggings. Four loko vinyl DIY consectetur nisi, marfa retro keffiyeh vegan. Fanny pack viral retro consectetur gentrify fap.</p>
</div>
<divclass="tab-pane"id="fat">
<p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
</div>
<divclass="tab-pane"id="mdo">
<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>
<p>Based on the excellent jQuery.tipsy plugin written by Jason Frame; twipsy is an updated version, which doesn't rely on images, uses css3 for animations, and data-attributes for title storage!</p>
<td>apply a css fade transition to the tooltip</td>
</tr>
<tr>
<td>delayIn</td>
<td>number</td>
<td>0</td>
<td>delay before showing tooltip (ms)</td>
</tr>
<tr>
<td>delayOut</td>
<td>number</td>
<td>0</td>
<td>delay before hiding tooltip (ms)</td>
</tr>
<tr>
<td>fallback</td>
<td>string</td>
<td>''</td>
<td>text to use when no tooltip title is present</td>
</tr>
<tr>
<td>placement</td>
<td>string</td>
<td>'above'</td>
<td>how to position the tooltip - above | below | left | right</td>
</tr>
<tr>
<td>html</td>
<td>boolean</td>
<td>false</td>
<td>allows html content within tooltip</td>
</tr>
<tr>
<td>live</td>
<td>boolean</td>
<td>false</td>
<td>use event delegation instead of individual event handlers</td>
</tr>
<tr>
<td>offset</td>
<td>number</td>
<td>0</td>
<td>pixel offset of tooltip from target element</td>
</tr>
<tr>
<td>title</td>
<td>string, function</td>
<td>'title'</td>
<td>attribute or method for retrieving title text</td>
</tr>
<tr>
<td>trigger</td>
<td>string</td>
<td>'hover'</td>
<td>how tooltip is triggered - hover | focus | manual</td>
</tr>
<tr>
<td>template</td>
<td>string</td>
<td>[default markup]</td>
<td>The html template used for rendering a twipsy.</td>
</tr>
</tbody>
</table>
<p><spanclass="label notice">Notice</span> Individual twipsy instance options can alternatively be specified through the use of data attributes.</code></p>
<preclass="prettyprint linenums"><a href="#" data-placement="below" rel='twipsy' title='Some title text'>text</a></pre>
<h3>Methods</h3>
<h4>$().twipsy(options)</h4>
<p>Attaches a twipsy handler to an element collection.</p>
<p>The popover plugin provides a simple interface for adding popovers to your application. It extends the <ahref="#twipsy">bootstrap-twipsy.js</a> plugin, so be sure to grab that file as well when including popovers in your project!</p>
<p><spanclass="label notice">Notice</span> You must include the bootstrap-twipsy.js file <strong>before</strong> bootstrap-popover.js.</p>
<td>apply a css fade transition to the tooltip</td>
</tr>
<tr>
<td>delayIn</td>
<td>number</td>
<td>0</td>
<td>delay before showing tooltip (ms)</td>
</tr>
<tr>
<td>delayOut</td>
<td>number</td>
<td>0</td>
<td>delay before hiding tooltip (ms)</td>
</tr>
<tr>
<td>fallback</td>
<td>string</td>
<td>''</td>
<td>text to use when no tooltip title is present</td>
</tr>
<tr>
<td>placement</td>
<td>string</td>
<td>'right'</td>
<td>how to position the tooltip - above | below | left | right</td>
</tr>
<tr>
<td>html</td>
<td>boolean</td>
<td>false</td>
<td>allows html content within tooltip</td>
</tr>
<tr>
<td>live</td>
<td>boolean</td>
<td>false</td>
<td>use event delegation instead of individual event handlers</td>
</tr>
<tr>
<td>offset</td>
<td>number</td>
<td>0</td>
<td>pixel offset of tooltip from target element</td>
</tr>
<tr>
<td>title</td>
<td>string, function</td>
<td>'title'</td>
<td>attribute or method for retrieving title text</td>
</tr>
<tr>
<td>content</td>
<td>string, function</td>
<td>'data-content'</td>
<td>a string or method for retrieving content text. if none are provided, content will be sourced from a data-content attribute.</td>
</tr>
<tr>
<td>trigger</td>
<td>string</td>
<td>'hover'</td>
<td>how tooltip is triggered - hover | focus | manual</td>
</tr>
<tr>
<td>template</td>
<td>string</td>
<td>[default markup]</td>
<td>The html template used for rendering a popover.</td>
</tr>
</tbody>
</table>
<p><spanclass="label notice">Notice</span> Individual popover instance options can alternatively be specified through the use of data attributes.</code></p>
<ahref="#"class="btn danger"rel="popover"title="A title"data-content="And here's some amazing content. It's very engaging. right?">hover for popover</a>
<p>Just add a <code>data-alert</code> attribute to your alert messages to automatically give them close functionality.</p>
<h3>Options</h3>
<tableclass="zebra-striped">
<thead>
<tr>
<thstyle="width: 100px;">Name</th>
<thstyle="width: 100px;">type</th>
<thstyle="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>selector</td>
<td>string</td>
<td>'.close'</td>
<td>What selector to target for closing an alert.</td>
</tr>
</tbody>
</table>
<h3>Methods</h3>
<h4>$().alert()</h4>
<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>
<p><strong>Oh snap! You got an error!</strong> 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>
<divclass="alert-actions">
<aclass="btn small"href="#">Take this action</a><aclass="btn small"href="#">Or do this</a>
</div>
</div>
</div>
</div>
</section>
</div><!-- /container -->
<footerclass="footer">
<divclass="container">
<pclass="pull-right"><ahref="#">Back to top</a></p>
<p>
Designed and built with all the love in the world <ahref="http://twitter.com/twitter"target="_blank">@twitter</a> by <ahref="http://twitter.com/mdo"target="_blank">@mdo</a> and <ahref="http://twitter.com/fat"target="_blank">@fat</a>.<br/>
Licensed under the <ahref="http://www.apache.org/licenses/LICENSE-2.0"target="_blank">Apache License v2.0</a>.