Commit 6fdb18b6 authored by fat's avatar fat
Browse files

Merge branch '3.0.0-wip' of github.com:twitter/bootstrap into 3.0.0-wip

parents e2d4cf5f 46a33204
Showing with 1124 additions and 1135 deletions
+1124 -1135
# Dependencies # Dependencies
markdown: rdiscount markdown: rdiscount
pygments: true pygments: true
# Permalinks # Permalinks
permalink: pretty permalink: pretty
# Server # Server
destination: ./_gh_pages destination: ./_gh_pages
exclude: [".editorconfig", ".gitignore", ".ruby-version", "bower.json", "composer.json", "CONTRIBUTING.md", "LICENSE", "Makefile", "package.json", "node_modules", "README.md", "less"] exclude: [".editorconfig", ".gitignore", ".ruby-version", "bower.json", "composer.json", "CONTRIBUTING.md", "LICENSE", "Makefile", "package.json", "node_modules", "README.md", "less"]
port: 9001 port: 9001
# Custom vars
repo: https://github.com/twbs/bootstrap
download: https://github.com/twbs/bootstrap/archive/v3.0.0-rc1.zip
download_dist: https://github.com/twbs/bootstrap/archive/v3.0.0-rc1-dist.zip
examples: http://examples.getbootstrap.com
examples_repo: https://github.com/twbs/bootstrap-examples
glyphicons: http://glyphicons.getbootstrap.com
glyphicons_repo: https://github.com/twbs/bootstrap-glyphicons
blog: http://blog.getbootstrap.com
expo: http://expo.getbootstrap.com
cdn_css: //netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css
cdn_js: //netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div class="bs-customize-placeholder"> <div class="bs-customize-placeholder">
<div class="container bs-docs-container"> <div class="container bs-docs-container">
<p class="lead">Until RC2, the Bootstrap 3 customizer will be disabled. In the mean time, snag the <a href="https://github.com/twbs/bootstrap/releases">compiled CSS and JavaScript</a>. Hang tight!</p> <p class="lead">Until RC2, the Bootstrap 3 customizer will be disabled. In the mean time, snag the <a href="{{ site.repo }}/releases">compiled CSS and JavaScript</a>. Hang tight!</p>
</div> </div>
</div> </div>
...@@ -38,11 +38,11 @@ ...@@ -38,11 +38,11 @@
<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> <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>
<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> <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>
<ul class="footer-links"> <ul class="footer-links">
<li><a href="http://blog.getbootstrap.com">Blog</a></li> <li><a href="{{ site.blog }}">Blog</a></li>
<li class="muted">&middot;</li> <li class="muted">&middot;</li>
<li><a href="https://github.com/twbs/bootstrap/issues?state=open">Issues</a></li> <li><a href="{{ site.repo }}/issues?state=open">Issues</a></li>
<li class="muted">&middot;</li> <li class="muted">&middot;</li>
<li><a href="https://github.com/twbs/bootstrap/releases">Releases</a></li> <li><a href="{{ site.repo }}/releases">Releases</a></li>
</ul> </ul>
</footer> </footer>
......
...@@ -51,9 +51,7 @@ ...@@ -51,9 +51,7 @@
</div> </div>
<!-- Quick back to top --> <!-- Quick back to top -->
<a href="#" class="bs-top"> <a href="#" class="bs-top">Back to top</a>
Back to top
</a>
<!-- Footer <!-- Footer
================================================== --> ================================================== -->
...@@ -63,11 +61,11 @@ ...@@ -63,11 +61,11 @@
<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> <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>
<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> <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>
<ul class="footer-links"> <ul class="footer-links">
<li><a href="http://blog.getbootstrap.com">Blog</a></li> <li><a href="{{ site.blog }}">Blog</a></li>
<li class="muted">&middot;</li> <li class="muted">&middot;</li>
<li><a href="https://github.com/twbs/bootstrap/issues?state=open">Issues</a></li> <li><a href="{{ site.repo }}/issues?state=open">Issues</a></li>
<li class="muted">&middot;</li> <li class="muted">&middot;</li>
<li><a href="https://github.com/twbs/bootstrap/releases">Releases</a></li> <li><a href="{{ site.repo }}/releases">Releases</a></li>
</ul> </ul>
</footer> </footer>
......
...@@ -21,16 +21,16 @@ ...@@ -21,16 +21,16 @@
<ul class="bs-masthead-links"> <ul class="bs-masthead-links">
<li> <li>
<a href="http://github.com/twbs/bootstrap" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'GitHub project']);">GitHub project</a> <a href="{{ site.repo }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'GitHub project']);">GitHub project</a>
</li> </li>
<li> <li>
<a href="http://examples.getbootstrap.com" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Examples']);">Examples</a> <a href="{{ site.examples }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Examples']);">Examples</a>
</li> </li>
<li> <li>
<a href="http://glyphicons.getbootstrap.com" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Glyphicons']);">Glyphicons</a> <a href="{{ site.glyphicons }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Glyphicons']);">Glyphicons</a>
</li> </li>
<li> <li>
<a href="http://expo.getbootstrap.com" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Expo']);">Bootstrap Expo</a> <a href="{{ site.expo }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Expo']);">Bootstrap Expo</a>
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -175,6 +175,10 @@ body { ...@@ -175,6 +175,10 @@ body {
position: relative; position: relative;
} }
.bs-docs-section + .bs-docs-section {
margin-top: 80px;
}
/* Ads in page headers */ /* Ads in page headers */
.carbonad { .carbonad {
width: auto !important; width: auto !important;
...@@ -211,11 +215,6 @@ body { ...@@ -211,11 +215,6 @@ body {
display: none; /* hide what I assume are tracking images */ display: none; /* hide what I assume are tracking images */
} }
/* Padding for in-page bookmarks */
.bs-docs-section {
padding-top: 30px;
}
/* Docs sidebar /* Docs sidebar
...@@ -230,23 +229,24 @@ body { ...@@ -230,23 +229,24 @@ body {
.bs-sidenav { .bs-sidenav {
margin-top: 30px; margin-top: 30px;
margin-bottom: 30px; margin-bottom: 30px;
padding-top: 5px; padding-top: 10px;
padding-bottom: 5px; padding-bottom: 10px;
text-shadow: 0 1px 0 #fff; text-shadow: 0 1px 0 #fff;
background-color: #f5f5f5; background-color: #f2f0f5;
border-radius: 5px; border-radius: 5px;
} }
/* All levels of nav */ /* All levels of nav */
.bs-sidebar .nav > li > a { .bs-sidebar .nav > li > a {
display: block; display: block;
color: #666; color: #716b7a;
padding: 5px 20px; padding: 5px 20px;
} }
.bs-sidebar .nav > li > a:hover, .bs-sidebar .nav > li > a:hover,
.bs-sidebar .nav > li > a:focus { .bs-sidebar .nav > li > a:focus {
text-decoration: none; text-decoration: none;
border-right: 1px solid #d5d5d5; background-color: #e5e3e9;
border-right: 1px solid #dbd8e0;
} }
.bs-sidebar .nav > .active > a, .bs-sidebar .nav > .active > a,
.bs-sidebar .nav > .active:hover > a, .bs-sidebar .nav > .active:hover > a,
......
...@@ -67,11 +67,8 @@ ...@@ -67,11 +67,8 @@
}) })
// popover demo // popover demo
$("a[data-toggle=popover]") $("[data-toggle=popover]")
.popover() .popover()
.click(function(e) {
e.preventDefault()
})
// button state demo // button state demo
$('#fat-btn') $('#fat-btn')
......
...@@ -8,9 +8,9 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na ...@@ -8,9 +8,9 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
<!-- Dropdowns <!-- Dropdowns
================================================== --> ================================================== -->
<div class="bs-docs-section" id="dropdowns"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Dropdown menus</h1> <h1 id="dropdowns">Dropdown menus</h1>
</div> </div>
<p class="lead">Toggleable, contextual menu for displaying lists of links. Made interactive with the <a href="/javascript/#dropdowns">dropdown JavaScript plugin</a>.</p> <p class="lead">Toggleable, contextual menu for displaying lists of links. Made interactive with the <a href="/javascript/#dropdowns">dropdown JavaScript plugin</a>.</p>
...@@ -97,9 +97,9 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na ...@@ -97,9 +97,9 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
<!-- Button Groups <!-- Button Groups
================================================== --> ================================================== -->
<div class="bs-docs-section" id="btn-groups"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Button groups</h1> <h1 id="btn-groups">Button groups</h1>
</div> </div>
<p class="lead">Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with <a href="/javascript/#js-buttons">our buttons plugin</a>.</p> <p class="lead">Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with <a href="/javascript/#js-buttons">our buttons plugin</a>.</p>
...@@ -218,9 +218,9 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na ...@@ -218,9 +218,9 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
<!-- Split button dropdowns <!-- Split button dropdowns
================================================== --> ================================================== -->
<div class="bs-docs-section" id="btn-dropdowns"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Button dropdown menus</h1> <h1 id="btn-dropdowns">Button dropdown menus</h1>
</div> </div>
<p class="lead">Use any button to trigger a dropdown menu by placing it within a <code>.btn-group</code> and providing the proper menu markup.</p> <p class="lead">Use any button to trigger a dropdown menu by placing it within a <code>.btn-group</code> and providing the proper menu markup.</p>
...@@ -478,9 +478,9 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na ...@@ -478,9 +478,9 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
<!-- Navs <!-- Navs
================================================== --> ================================================== -->
<div class="bs-docs-section" id="nav"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Navs</h1> <h1 id="nav">Navs</h1>
</div> </div>
<p class="lead">Navs available in Bootstrap have shared markup, starting with the base <code>.nav</code> class, as well as shared states. Swap modifier classes to switch between each style.</p> <p class="lead">Navs available in Bootstrap have shared markup, starting with the base <code>.nav</code> class, as well as shared states. Swap modifier classes to switch between each style.</p>
...@@ -666,12 +666,11 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na ...@@ -666,12 +666,11 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
<!-- Navbar <!-- Navbar
================================================== --> ================================================== -->
<div class="bs-docs-section" id="navbar"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Navbar</h1> <h1 id="navbar">Navbar</h1>
</div> </div>
<h2 id="navbar-basic">Basic navbar</h2> <h2 id="navbar-basic">Basic navbar</h2>
<p>To start, navbars are static (not fixed to the top) and include support for a project name and basic navigation. Place one anywhere within a <code>.container</code>, which sets the width of your site and content.</p> <p>To start, navbars are static (not fixed to the top) and include support for a project name and basic navigation. Place one anywhere within a <code>.container</code>, which sets the width of your site and content.</p>
<div class="bs-example"> <div class="bs-example">
...@@ -1042,9 +1041,9 @@ body { padding-bottom: 70px; } ...@@ -1042,9 +1041,9 @@ body { padding-bottom: 70px; }
<!-- Breadcrumbs <!-- Breadcrumbs
================================================== --> ================================================== -->
<div class="bs-docs-section" id="breadcrumbs"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Breadcrumbs <small></small></h1> <h1 id="breadcrumbs">Breadcrumbs <small></small></h1>
</div> </div>
<p class="lead">Indicate the current page's location within a navigational hierarchy.</p> <p class="lead">Indicate the current page's location within a navigational hierarchy.</p>
<p>Separators are automatically added in CSS through <code>:before</code> and <code>content</code>.</p> <p>Separators are automatically added in CSS through <code>:before</code> and <code>content</code>.</p>
...@@ -1075,9 +1074,9 @@ body { padding-bottom: 70px; } ...@@ -1075,9 +1074,9 @@ body { padding-bottom: 70px; }
<!-- Pagination <!-- Pagination
================================================== --> ================================================== -->
<div class="bs-docs-section" id="pagination"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Pagination</h1> <h1 id="pagination">Pagination</h1>
</div> </div>
<p class="lead">Provide pagination links for your site or app with the multi-page pagination component, or the simpler <a href="#pagination-pager">pager alternative</a>.</p> <p class="lead">Provide pagination links for your site or app with the multi-page pagination component, or the simpler <a href="#pagination-pager">pager alternative</a>.</p>
...@@ -1234,9 +1233,9 @@ body { padding-bottom: 70px; } ...@@ -1234,9 +1233,9 @@ body { padding-bottom: 70px; }
<!-- Labels <!-- Labels
================================================== --> ================================================== -->
<div class="bs-docs-section" id="labels"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Labels</h1> <h1 id="labels">Labels</h1>
</div> </div>
<p class="lead"></p> <p class="lead"></p>
...@@ -1276,9 +1275,9 @@ body { padding-bottom: 70px; } ...@@ -1276,9 +1275,9 @@ body { padding-bottom: 70px; }
<!-- Badges <!-- Badges
================================================== --> ================================================== -->
<div class="bs-docs-section" id="badges"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Badges</h1> <h1 id="badges">Badges</h1>
</div> </div>
<p class="lead">Easily highlight new or unread items by adding a <code>&lt;span class="badge"&gt;</code> to links, Bootstrap navs, and more.</p> <p class="lead">Easily highlight new or unread items by adding a <code>&lt;span class="badge"&gt;</code> to links, Bootstrap navs, and more.</p>
...@@ -1339,9 +1338,9 @@ body { padding-bottom: 70px; } ...@@ -1339,9 +1338,9 @@ body { padding-bottom: 70px; }
<!-- Typographic components <!-- Typographic components
================================================== --> ================================================== -->
<div class="bs-docs-section" id="type-components"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Typographic components</h1> <h1 id="type-components">Typographic components</h1>
</div> </div>
<h2 id="type-components-jumbotron">Jumbotron</h2> <h2 id="type-components-jumbotron">Jumbotron</h2>
...@@ -1379,9 +1378,9 @@ body { padding-bottom: 70px; } ...@@ -1379,9 +1378,9 @@ body { padding-bottom: 70px; }
<!-- Thumbnails <!-- Thumbnails
================================================== --> ================================================== -->
<div class="bs-docs-section" id="thumbnails"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Thumbnails</h1> <h1 id="thumbnails">Thumbnails</h1>
</div> </div>
<p class="lead">Extend Bootstrap's <a href="/css/#grid">grid system</a> with the thumbnail component to easily display grids of images, videos, text, and more.</p> <p class="lead">Extend Bootstrap's <a href="/css/#grid">grid system</a> with the thumbnail component to easily display grids of images, videos, text, and more.</p>
...@@ -1479,9 +1478,9 @@ body { padding-bottom: 70px; } ...@@ -1479,9 +1478,9 @@ body { padding-bottom: 70px; }
<!-- Alerts <!-- Alerts
================================================== --> ================================================== -->
<div class="bs-docs-section" id="alerts"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Alerts</h1> <h1 id="alerts">Alerts</h1>
</div> </div>
<p class="lead">Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the <a href="/javascript/#js-alerts">alerts jQuery plugin</a>.</p> <p class="lead">Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the <a href="/javascript/#js-alerts">alerts jQuery plugin</a>.</p>
...@@ -1579,9 +1578,9 @@ body { padding-bottom: 70px; } ...@@ -1579,9 +1578,9 @@ body { padding-bottom: 70px; }
<!-- Progress bars <!-- Progress bars
================================================== --> ================================================== -->
<div class="bs-docs-section" id="progress"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Progress bars</h1> <h1 id="progress">Progress bars</h1>
</div> </div>
<p class="lead">Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.</p> <p class="lead">Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.</p>
...@@ -1701,9 +1700,9 @@ body { padding-bottom: 70px; } ...@@ -1701,9 +1700,9 @@ body { padding-bottom: 70px; }
<!-- Media object <!-- Media object
================================================== --> ================================================== -->
<div class="bs-docs-section" id="media"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Media object</h1> <h1 id="media">Media object</h1>
</div> </div>
<p class="lead">Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.</p> <p class="lead">Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.</p>
...@@ -1825,9 +1824,9 @@ body { padding-bottom: 70px; } ...@@ -1825,9 +1824,9 @@ body { padding-bottom: 70px; }
<!-- List group <!-- List group
================================================== --> ================================================== -->
<div class="bs-docs-section" id="list-group"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>List group</h1> <h1 id="list-group">List group</h1>
</div> </div>
<p class="lead">List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.</p> <p class="lead">List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.</p>
...@@ -1945,9 +1944,9 @@ body { padding-bottom: 70px; } ...@@ -1945,9 +1944,9 @@ body { padding-bottom: 70px; }
<!-- Panels <!-- Panels
================================================== --> ================================================== -->
<div class="bs-docs-section" id="panels"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Panels</h1> <h1 id="panels">Panels</h1>
</div> </div>
<p class="lead">While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.</p> <p class="lead">While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.</p>
...@@ -2092,9 +2091,9 @@ body { padding-bottom: 70px; } ...@@ -2092,9 +2091,9 @@ body { padding-bottom: 70px; }
<!-- Wells <!-- Wells
================================================== --> ================================================== -->
<div class="bs-docs-section" id="wells"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Wells</h1> <h1 id="wells">Wells</h1>
</div> </div>
<h3>Default well</h3> <h3>Default well</h3>
......
...@@ -8,9 +8,9 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e ...@@ -8,9 +8,9 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
<!-- Global Bootstrap settings <!-- Global Bootstrap settings
================================================== --> ================================================== -->
<div class="bs-docs-section" id="overview"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Overview</h1> <h1 id="overview">Overview</h1>
</div> </div>
<p class="lead">Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.</p> <p class="lead">Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.</p>
...@@ -56,9 +56,9 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e ...@@ -56,9 +56,9 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
<!-- Glyphicons icon font <!-- Glyphicons icon font
================================================== --> ================================================== -->
<div class="bs-docs-section" id="glyphicons"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Glyphicons</h1> <h1 id="glyphicons">Glyphicons</h1>
</div> </div>
<p class="lead">With the launch of Bootstrap 3, icons have been moved to a <a href="https://github.com/twbs/bootstrap-glyphicons">separate repository</a>. This keeps the primary project as lean as possible, makes it easier for folks to swap icon libraries, and makes Glyphicons icon fonts more readily available to more people outside Bootstrap.</p> <p class="lead">With the launch of Bootstrap 3, icons have been moved to a <a href="https://github.com/twbs/bootstrap-glyphicons">separate repository</a>. This keeps the primary project as lean as possible, makes it easier for folks to swap icon libraries, and makes Glyphicons icon fonts more readily available to more people outside Bootstrap.</p>
<p class="lead"> <p class="lead">
...@@ -70,9 +70,9 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e ...@@ -70,9 +70,9 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
<!-- Grid system <!-- Grid system
================================================== --> ================================================== -->
<div class="bs-docs-section" id="grid"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Grid system</h1> <h1 id="grid">Grid system</h1>
</div> </div>
<p class="lead">Bootstrap includes a responsive, mobile-first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes <a href="#grid-example-basic">predefined classes</a> for easy layout options, as well as powerful <a href="#grid-less">mixins for generating more semantic layouts</a>.</p> <p class="lead">Bootstrap includes a responsive, mobile-first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes <a href="#grid-example-basic">predefined classes</a> for easy layout options, as well as powerful <a href="#grid-less">mixins for generating more semantic layouts</a>.</p>
...@@ -410,9 +410,9 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e ...@@ -410,9 +410,9 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
<!-- Typography <!-- Typography
================================================== --> ================================================== -->
<div class="bs-docs-section" id="type"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Typography</h1> <h1 id="type">Typography</h1>
</div> </div>
<!-- Headings --> <!-- Headings -->
...@@ -801,9 +801,9 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e ...@@ -801,9 +801,9 @@ lead: "Global CSS settings, fundamental HTML elements styled and enhanced with e
<!-- Code <!-- Code
================================================== --> ================================================== -->
<div class="bs-docs-section" id="code"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Code</h1> <h1 id="code">Code</h1>
</div> </div>
<h2>Inline</h2> <h2>Inline</h2>
...@@ -831,9 +831,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline. ...@@ -831,9 +831,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<!-- Tables <!-- Tables
================================================== --> ================================================== -->
<div class="bs-docs-section" id="tables"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Tables</h1> <h1 id="tables">Tables</h1>
</div> </div>
<h2 id="tables-example">Basic example</h2> <h2 id="tables-example">Basic example</h2>
...@@ -1160,9 +1160,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline. ...@@ -1160,9 +1160,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<!-- Forms <!-- Forms
================================================== --> ================================================== -->
<div class="bs-docs-section" id="forms"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Forms</h1> <h1 id="forms">Forms</h1>
</div> </div>
<h2 id="forms-example">Basic example</h2> <h2 id="forms-example">Basic example</h2>
...@@ -1839,9 +1839,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline. ...@@ -1839,9 +1839,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<!-- Buttons <!-- Buttons
================================================== --> ================================================== -->
<div class="bs-docs-section" id="buttons"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Buttons</h1> <h1 id="buttons">Buttons</h1>
</div> </div>
<h2 id="buttons-options">Button options</h2> <h2 id="buttons-options">Button options</h2>
...@@ -1986,9 +1986,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline. ...@@ -1986,9 +1986,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<!-- Images <!-- Images
================================================== --> ================================================== -->
<div class="bs-docs-section" id="images"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Images</h1> <h1 id="images">Images</h1>
</div> </div>
<p>Add classes to an <code>&lt;img&gt;</code> element to easily style images in any project.</p> <p>Add classes to an <code>&lt;img&gt;</code> element to easily style images in any project.</p>
...@@ -2012,9 +2012,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline. ...@@ -2012,9 +2012,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<!-- Helpers <!-- Helpers
================================================== --> ================================================== -->
<div class="bs-docs-section" id="helper-classes"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Helper classes</h1> <h1 id="helper-classes">Helper classes</h1>
</div> </div>
<h3>Close icon</h3> <h3>Close icon</h3>
......
...@@ -8,10 +8,10 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge ...@@ -8,10 +8,10 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge
<!-- Customize <!-- Customize
================================================== --> ================================================== -->
<form class="bs-customizer"> <form class="bs-customizer">
<div class="bs-docs-section" id="less"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<button class="btn btn-default toggle" type="button">Toggle all</button> <button class="btn btn-default toggle" type="button">Toggle all</button>
<h1>LESS files</h1> <h1 id="less">LESS files</h1>
</div> </div>
<p class="lead">Choose which LESS files to compile into your custom build of Bootstrap. Not sure which files to use? Read through the <a href="/css/">CSS</a> and <a href="/components/">Components</a> pages in the docs</p> <p class="lead">Choose which LESS files to compile into your custom build of Bootstrap. Not sure which files to use? Read through the <a href="/css/">CSS</a> and <a href="/components/">Components</a> pages in the docs</p>
...@@ -263,10 +263,10 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge ...@@ -263,10 +263,10 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge
<div class="bs-docs-section" id="plugins"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<button class="btn btn-default toggle" type="button">Toggle all</button> <button class="btn btn-default toggle" type="button">Toggle all</button>
<h1>jQuery plugins</h1> <h1 id="plugins">jQuery plugins</h1>
</div> </div>
<p class="lead">Choose which jQuery plugins should be included in your custom JavaScript files. Unsure what to include? Read the <a href="/javascript/">JavaScript</a> page in the docs.</p> <p class="lead">Choose which jQuery plugins should be included in your custom JavaScript files. Unsure what to include? Read the <a href="/javascript/">JavaScript</a> page in the docs.</p>
<div class="row"> <div class="row">
...@@ -363,10 +363,10 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge ...@@ -363,10 +363,10 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge
<div class="bs-docs-section" id="less-variables"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<button class="btn btn-default toggle" type="button">Reset to defaults</button> <button class="btn btn-default toggle" type="button">Reset to defaults</button>
<h1>LESS variables</h1> <h1 id="less-variables">LESS variables</h1>
</div> </div>
<p class="lead">Customize LESS variables to define colors, sizes and more inside your custom CSS stylesheets.</p> <p class="lead">Customize LESS variables to define colors, sizes and more inside your custom CSS stylesheets.</p>
...@@ -1425,9 +1425,9 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge ...@@ -1425,9 +1425,9 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge
</div> </div>
</div> </div>
<div class="bs-docs-section" id="download"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Download</h1> <h1 id="download">Download</h1>
</div> </div>
<p class="lead">Hooray! Your custom version of Bootstrap is now ready to be compiled. Just click the button below to finish the process.</p> <p class="lead">Hooray! Your custom version of Bootstrap is now ready to be compiled. Just click the button below to finish the process.</p>
<div class="bs-customize-download"> <div class="bs-customize-download">
......
...@@ -8,26 +8,26 @@ lead: "An overview of Bootstrap, how to download and use, basic templates and ex ...@@ -8,26 +8,26 @@ lead: "An overview of Bootstrap, how to download and use, basic templates and ex
<!-- Getting started <!-- Getting started
================================================== --> ================================================== -->
<div class="bs-docs-section" id="download"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Download Bootstrap</h1> <h1 id="download">Download Bootstrap</h1>
</div> </div>
<p class="lead">There are a few easy ways to quickly get started with Bootstrap, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.</p> <p class="lead">There are a few easy ways to quickly get started with Bootstrap, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.</p>
<h3>Download compiled CSS and JS</h3> <h3>Download compiled CSS and JS</h3>
<p class="lead">The fastest way to get started is to get the compiled and minified versions of our CSS and JavaScript. No documentation or original source files are included.</p> <p class="lead">The fastest way to get started is to get the compiled and minified versions of our CSS and JavaScript. No documentation or original source files are included.</p>
<p><a class="btn btn-large btn-primary" href="assets/bootstrap.zip" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);">Download Bootstrap</a></p> <p><a class="btn btn-large btn-primary" href="{{ site.download_dist }}" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download compiled']);">Download Bootstrap</a></p>
<hr> <hr>
<h3 id="download-options">More download options</h3> <h3 id="download-options">More download options</h3>
<div class="bs-docs-dl-options"> <div class="bs-docs-dl-options">
<h4> <h4>
<a href="https://github.com/twbs/bootstrap/zipball/master" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);">Download latest source code</a> <a href="{{ site.download }}" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'Download source']);">Download latest source code</a>
</h4> </h4>
<p>Get the original files for all CSS and JavaScript by downloading the latest version directly from GitHub.</p> <p>Get the original files for all CSS and JavaScript by downloading the latest version directly from GitHub.</p>
<h4> <h4>
<a href="https://github.com/twbs/bootstrap/" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'GitHub project']);">Clone or fork via GitHub</a> <a href="{{ site.repo }}" onclick="_gaq.push(['_trackEvent', 'Getting started', 'Download', 'GitHub project']);">Clone or fork via GitHub</a>
</h4> </h4>
<p>Clone the entire project or fork your own version of Bootstrap to make it your own by visiting us on GitHub.</p> <p>Clone the entire project or fork your own version of Bootstrap to make it your own by visiting us on GitHub.</p>
<h4> <h4>
...@@ -43,10 +43,10 @@ lead: "An overview of Bootstrap, how to download and use, basic templates and ex ...@@ -43,10 +43,10 @@ lead: "An overview of Bootstrap, how to download and use, basic templates and ex
<p>The folks over at <a href="https://www.netdna.com/">NetDNA</a> have graciously provided CDN support for Bootstrap's CSS and JavaScript. To use, swap your local instances for the <a href="http://www.bootstrapcdn.com/">Bootstrap CDN</a> links listed below.</p> <p>The folks over at <a href="https://www.netdna.com/">NetDNA</a> have graciously provided CDN support for Bootstrap's CSS and JavaScript. To use, swap your local instances for the <a href="http://www.bootstrapcdn.com/">Bootstrap CDN</a> links listed below.</p>
{% highlight html linenos %} {% highlight html linenos %}
<!-- Latest compiled and minified CSS --> <!-- Latest compiled and minified CSS -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> <link href="{{ site.cdn_css }}">
<!-- Latest compiled and minified JavaScript --> <!-- Latest compiled and minified JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="{{ site.cdn_js }}"></script>
{% endhighlight %} {% endhighlight %}
<div class="bs-callout bs-callout-warning" id="callout-less-compilation"> <div class="bs-callout bs-callout-warning" id="callout-less-compilation">
...@@ -59,9 +59,9 @@ lead: "An overview of Bootstrap, how to download and use, basic templates and ex ...@@ -59,9 +59,9 @@ lead: "An overview of Bootstrap, how to download and use, basic templates and ex
<!-- File structure <!-- File structure
================================================== --> ================================================== -->
<div class="bs-docs-section" id="whats-included"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>What's included</h1> <h1 id="whats-included">What's included</h1>
</div> </div>
<p class="lead">Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.</p> <p class="lead">Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.</p>
<p>Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:</p> <p>Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:</p>
...@@ -79,7 +79,7 @@ bootstrap/ ...@@ -79,7 +79,7 @@ bootstrap/
<p>This is the most basic form of Bootstrap: compiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (<code>bootstrap.*</code>), as well as compiled and minified CSS and JS (<code>bootstrap.min.*</code>). The image files are compressed using <a href="http://imageoptim.com/">ImageOptim</a>, a Mac app for compressing PNGs.</p> <p>This is the most basic form of Bootstrap: compiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (<code>bootstrap.*</code>), as well as compiled and minified CSS and JS (<code>bootstrap.min.*</code>). The image files are compressed using <a href="http://imageoptim.com/">ImageOptim</a>, a Mac app for compressing PNGs.</p>
<div class="bs-callout bs-callout-danger"> <div class="bs-callout bs-callout-danger">
<h4>jQuery required</h4> <h4>jQuery required</h4>
<p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included, as shown in the <a href="#examples">starter template</a>.</p> <p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included, as shown in the <a href="#template">starter template</a>.</p>
</div> </div>
</div> </div>
...@@ -87,13 +87,12 @@ bootstrap/ ...@@ -87,13 +87,12 @@ bootstrap/
<!-- Template <!-- Template
================================================== --> ================================================== -->
<div class="bs-docs-section" id="template"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Basic template</h1> <h1 id="template">Basic template</h1>
</div> </div>
<p class="lead">Make use of a super basic HTML template, or dive into a few examples we've started for you. We encourage folks to iterate on these examples and not simply use them as an end result.</p> <p class="lead">Make use of a super basic HTML template, or dive into a <a href="{{ site.examples }}">few examples</a> we've started for you. We encourage folks to iterate on these examples and not simply use them as an end result.</p>
<h3 id="examples-template">HTML template</h3>
<p>Copy and paste the HTML from below to get started with a bare bones Bootstrap document.</p> <p>Copy and paste the HTML from below to get started with a bare bones Bootstrap document.</p>
{% highlight html %} {% highlight html %}
<!DOCTYPE html> <!DOCTYPE html>
...@@ -118,19 +117,17 @@ bootstrap/ ...@@ -118,19 +117,17 @@ bootstrap/
</html> </html>
{% endhighlight %} {% endhighlight %}
<hr>
<h3>Looking for more example templates?</h3> <h3>Looking for more example templates?</h3>
<p>Check out the new <a href="https://github.com/twbs/bootstrap-examples">Examples repository on GitHub</a>, or <a href="http://examples.getbootstrap.com">view them in your browser</a>. Included are over a dozen example templates for building with and extending Bootstrap.</p> <p>Check out the new <a href="{{ site.examples_repo }}">Examples repository on GitHub</a>, or <a href="{{ site.examples }}">view them in your browser</a>. Included are over a dozen example templates for building with and extending Bootstrap.</p>
</div> </div>
<!-- Browser compatibility <!-- Browser compatibility
================================================== --> ================================================== -->
<div class="bs-docs-section" id="browsers"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Browser compatibility</h1> <h1 id="browsers">Browser compatibility</h1>
</div> </div>
<p class="lead">Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older and less advanced browsers might receive a less stylized, though fully functional, version of certain components.</p> <p class="lead">Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older and less advanced browsers might receive a less stylized, though fully functional, version of certain components.</p>
...@@ -157,9 +154,9 @@ bootstrap/ ...@@ -157,9 +154,9 @@ bootstrap/
<!-- License FAQs <!-- License FAQs
================================================== --> ================================================== -->
<div class="bs-docs-section" id="license-faqs"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>License FAQs</h1> <h1 id="license-faqs">License FAQs</h1>
</div> </div>
<p class="lead">Bootstrap is released under the Apache 2 license and is copyright {{ site.time | date: "%Y" }} Twitter. Boiled down to smaller chunks, it can be described with the following conditions.</p> <p class="lead">Bootstrap is released under the Apache 2 license and is copyright {{ site.time | date: "%Y" }} Twitter. Boiled down to smaller chunks, it can be described with the following conditions.</p>
...@@ -196,15 +193,15 @@ bootstrap/ ...@@ -196,15 +193,15 @@ bootstrap/
</ul> </ul>
</div> </div>
</div> </div>
<p>The full Bootstrap license is located <a href="https://github.com/twbs/bootstrap/blob/master/README.md">in the project repository</a> for more information.</p> <p>The full Bootstrap license is located <a href="{{ site.repo }}/blob/master/README.md">in the project repository</a> for more information.</p>
</div><!-- /.bs-docs-section --> </div><!-- /.bs-docs-section -->
<div class="bs-docs-section" id="customizing"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1>Customizing Bootstrap</h1> <h1 id="customizing">Customizing Bootstrap</h1>
</div> </div>
<p class="lead">Customizing Bootstrap is best accomplished when you treat it as another dependency in your development stack. Doing so ensures future upgrades are as easy as possible while also familiarizing yourself to the intricacies of the framework.</p> <p class="lead">Customizing Bootstrap is best accomplished when you treat it as another dependency in your development stack. Doing so ensures future upgrades are as easy as possible while also familiarizing yourself to the intricacies of the framework.</p>
......
...@@ -8,7 +8,7 @@ title: Bootstrap ...@@ -8,7 +8,7 @@ title: Bootstrap
<h1>Bootstrap 3</h1> <h1>Bootstrap 3</h1>
<p class="lead">Sleek, intuitive, and powerful mobile-first front-end framework for faster and easier web development.</p> <p class="lead">Sleek, intuitive, and powerful mobile-first front-end framework for faster and easier web development.</p>
<p> <p>
<a href="assets/bootstrap.zip" class="btn btn-bs btn-large" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download 3.0.0 RC1']);">Download Bootstrap</a> <a href="{{ site.download_dist }}" class="btn btn-bs btn-large" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Download', 'Download 3.0.0 RC1']);">Download Bootstrap</a>
</p> </p>
</div> </div>
</div> </div>
...@@ -222,8 +222,6 @@ $('#myModal').on('show.bs.modal', function (e) { ...@@ -222,8 +222,6 @@ $('#myModal').on('show.bs.modal', function (e) {
</div><!-- /.modal --> </div><!-- /.modal -->
{% endhighlight %} {% endhighlight %}
<h2 id="modals-usage">Usage</h2> <h2 id="modals-usage">Usage</h2>
<h3>Via data attributes</h3> <h3>Via data attributes</h3>
...@@ -337,74 +335,31 @@ $('#myModal').on('hidden.bs.modal', function () { ...@@ -337,74 +335,31 @@ $('#myModal').on('hidden.bs.modal', function () {
<!-- Dropdowns <!-- Dropdowns
================================================== --> ================================================== -->
<div class="bs-docs-section"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1 id="dropdowns">Dropdowns <small>dropdown.js</small></h1> <h1 id="dropdowns">Dropdowns <small>dropdown.js</small></h1>
</div> </div>
<h2 id="dropdowns-examples">Examples</h2> <h2 id="dropdowns-examples">Examples</h2>
<p>Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.</p> <p>Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.</p>
<h3>Within a navbar</h3> <h3>Within a navbar</h3>
<div class="bs-example"> <div class="bs-example">
<div id="navbar-example" class="navbar navbar-static"> <div id="navbar-example" class="navbar navbar-static">
<div class="container" style="width: auto;"> <div class="container" style="width: auto;">
<a class="navbar-brand" href="#">Project Name</a> <a class="navbar-brand" href="#">Project Name</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-js-navbar-collapse"> <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-js-navbar-collapse">
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<div class="nav-collapse collapse bs-js-navbar-collapse"> <div class="nav-collapse collapse bs-js-navbar-collapse">
<ul class="nav navbar-nav" role="navigation"> <ul class="nav navbar-nav" role="navigation">
<li class="dropdown">
<a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2 <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav pull-right">
<li id="fat-menu" class="dropdown">
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 3 <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
</ul>
</div><!-- /.nav-collapse -->
</div><!-- /.container -->
</div> <!-- /navbar-example -->
</div> <!-- /example -->
<h3>Within tabs</h3>
<div class="bs-example">
<ul class="nav nav-pills">
<li class="active"><a href="#">Regular link</a></li>
<li class="dropdown"> <li class="dropdown">
<a class="dropdown-toggle" id="drop4" role="button" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a> <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4"> <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
...@@ -413,8 +368,8 @@ $('#myModal').on('hidden.bs.modal', function () { ...@@ -413,8 +368,8 @@ $('#myModal').on('hidden.bs.modal', function () {
</ul> </ul>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 2 <b class="caret"></b></a> <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2 <b class="caret"></b></a>
<ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5"> <ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
...@@ -422,9 +377,11 @@ $('#myModal').on('hidden.bs.modal', function () { ...@@ -422,9 +377,11 @@ $('#myModal').on('hidden.bs.modal', function () {
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul> </ul>
</li> </li>
<li class="dropdown"> </ul>
<a class="dropdown-toggle" id="drop6" role="button" data-toggle="dropdown" href="#">Dropdown 3 <b class="caret"></b></a> <ul class="nav navbar-nav pull-right">
<ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop6"> <li id="fat-menu" class="dropdown">
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 3 <b class="caret"></b></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
...@@ -432,17 +389,54 @@ $('#myModal').on('hidden.bs.modal', function () { ...@@ -432,17 +389,54 @@ $('#myModal').on('hidden.bs.modal', function () {
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul> </ul>
</li> </li>
</ul> <!-- /tabs --> </ul>
</div> <!-- /example --> </div><!-- /.nav-collapse -->
</div><!-- /.container -->
</div> <!-- /navbar-example -->
<hr class="bs-docs-separator"> </div> <!-- /example -->
<h3>Within tabs</h3>
<div class="bs-example">
<ul class="nav nav-pills">
<li class="active"><a href="#">Regular link</a></li>
<li class="dropdown">
<a class="dropdown-toggle" id="drop4" role="button" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a>
<ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 2 <b class="caret"></b></a>
<ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" id="drop6" role="button" data-toggle="dropdown" href="#">Dropdown 3 <b class="caret"></b></a>
<ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop6">
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
</ul>
</li>
</ul> <!-- /tabs -->
</div> <!-- /example -->
<h2 id="dropdowns-usage">Usage</h2> <h2 id="dropdowns-usage">Usage</h2>
<h3>Via data attributes</h3> <h3>Via data attributes</h3>
<p>Add <code>data-toggle="dropdown"</code> to a link or button to toggle a dropdown.</p> <p>Add <code>data-toggle="dropdown"</code> to a link or button to toggle a dropdown.</p>
{% highlight html %} {% highlight html %}
<div class="dropdown"> <div class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown trigger</a> <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown trigger</a>
...@@ -463,94 +457,94 @@ $('#myModal').on('hidden.bs.modal', function () { ...@@ -463,94 +457,94 @@ $('#myModal').on('hidden.bs.modal', function () {
</div> </div>
{% endhighlight %} {% endhighlight %}
<h3>Via JavaScript</h3> <h3>Via JavaScript</h3>
<p>Call the dropdowns via JavaScript:</p> <p>Call the dropdowns via JavaScript:</p>
{% highlight js %} {% highlight js %}
$('.dropdown-toggle').dropdown() $('.dropdown-toggle').dropdown()
{% endhighlight %} {% endhighlight %}
<h3>Options</h3> <h3>Options</h3>
<p><em>None</em></p> <p><em>None</em></p>
<h3>Methods</h3> <h3>Methods</h3>
<h4>$().dropdown('toggle')</h4> <h4>$().dropdown('toggle')</h4>
<p>A programmatic api for toggling menus for a given navbar or tabbed navigation.</p> <p>A programmatic api for toggling menus for a given navbar or tabbed navigation.</p>
</section> </div>
<!-- ScrollSpy <!-- ScrollSpy
================================================== --> ================================================== -->
<div class="bs-docs-section"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1 id="scrollspy">ScrollSpy <small>scrollspy.js</small></h1> <h1 id="scrollspy">ScrollSpy <small>scrollspy.js</small></h1>
</div> </div>
<h2 id="scrollspy-examples">Example in navbar</h2> <h2 id="scrollspy-examples">Example in navbar</h2>
<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> <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>
<div class="bs-example"> <div class="bs-example">
<div id="navbar-example2" class="navbar navbar-static"> <div id="navbar-example2" class="navbar navbar-static">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container" style="width: auto;"> <div class="container" style="width: auto;">
<a class="navbar-brand" href="#">Project Name</a> <a class="navbar-brand" href="#">Project Name</a>
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a href="#fat">@fat</a></li> <li><a href="#fat">@fat</a></li>
<li><a href="#mdo">@mdo</a></li> <li><a href="#mdo">@mdo</a></li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="#one">one</a></li> <li><a href="#one">one</a></li>
<li><a href="#two">two</a></li> <li><a href="#two">two</a></li>
<li class="divider"></li> <li class="divider"></li>
<li><a href="#three">three</a></li> <li><a href="#three">three</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
<div data-spy="scroll" data-target="#navbar-example2" data-offset="0" class="scrollspy-example"> <div data-spy="scroll" data-target="#navbar-example2" data-offset="0" class="scrollspy-example">
<h4 id="fat">@fat</h4> <h4 id="fat">@fat</h4>
<p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>
<h4 id="mdo">@mdo</h4> <h4 id="mdo">@mdo</h4>
<p>Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.</p> <p>Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.</p>
<h4 id="one">one</h4> <h4 id="one">one</h4>
<p>Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.</p> <p>Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.</p>
<h4 id="two">two</h4> <h4 id="two">two</h4>
<p>In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.</p> <p>In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.</p>
<h4 id="three">three</h4> <h4 id="three">three</h4>
<p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>
<p>Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats. <p>Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.
</p> </p>
</div> </div>
</div><!-- /example --> </div><!-- /example -->
<h2 id="scrollspy-usage">Usage</h2> <h2 id="scrollspy-usage">Usage</h2>
<h3>Via data attributes</h3> <h3>Via data attributes</h3>
<p>To easily add scrollspy behavior to your topbar navigation, add <code>data-spy="scroll"</code> to the element you want to spy on (most typically this would be the <code>&lt;body&gt;</code>. Then add the <code>data-target</code> attribute with the ID or class of the parent element of any Bootstrap <code>.nav</code> component.</p> <p>To easily add scrollspy behavior to your topbar navigation, add <code>data-spy="scroll"</code> to the element you want to spy on (most typically this would be the <code>&lt;body&gt;</code>. Then add the <code>data-target</code> attribute with the ID or class of the parent element of any Bootstrap <code>.nav</code> component.</p>
{% highlight html %} {% highlight html %}
<body data-spy="scroll" data-target="#navbar-example"> <body data-spy="scroll" data-target="#navbar-example">
... ...
</body> </body>
{% endhighlight %} {% endhighlight %}
<h3>Via JavaScript</h3> <h3>Via JavaScript</h3>
<p>Call the scrollspy via JavaScript:</p> <p>Call the scrollspy via JavaScript:</p>
{% highlight js %} {% highlight js %}
$('#navbar-example').scrollspy() $('#navbar-example').scrollspy()
{% endhighlight %} {% endhighlight %}
<div class="bs-callout bs-callout-danger"> <div class="bs-callout bs-callout-danger">
<h4>Resolvable ID targets required</h4> <h4>Resolvable ID targets required</h4>
<p>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>.</p> <p>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>.</p>
</div> </div>
<h3>Methods</h3> <h3>Methods</h3>
<h4>.scrollspy('refresh')</h4> <h4>.scrollspy('refresh')</h4>
<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> <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>
{% highlight js %} {% highlight js %}
$('[data-spy="scroll"]').each(function () { $('[data-spy="scroll"]').each(function () {
var $spy = $(this).scrollspy('refresh') var $spy = $(this).scrollspy('refresh')
...@@ -558,95 +552,91 @@ $('[data-spy="scroll"]').each(function () { ...@@ -558,95 +552,91 @@ $('[data-spy="scroll"]').each(function () {
{% endhighlight %} {% endhighlight %}
<h3>Options</h3> <h3>Options</h3>
<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> <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>
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
<tr> <tr>
<th style="width: 100px;">Name</th> <th style="width: 100px;">Name</th>
<th style="width: 100px;">type</th> <th style="width: 100px;">type</th>
<th style="width: 50px;">default</th> <th style="width: 50px;">default</th>
<th>description</th> <th>description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>offset</td> <td>offset</td>
<td>number</td> <td>number</td>
<td>10</td> <td>10</td>
<td>Pixels to offset from top when calculating position of scroll.</td> <td>Pixels to offset from top when calculating position of scroll.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3>Events</h3> <h3>Events</h3>
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
<tr> <tr>
<th style="width: 150px;">Event Type</th> <th style="width: 150px;">Event Type</th>
<th>Description</th> <th>Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>activate</td> <td>activate</td>
<td>This event fires whenever a new item becomes activated by the scrollspy.</td> <td>This event fires whenever a new item becomes activated by the scrollspy.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% highlight js %} {% highlight js %}
$('#myScrollspy').on('activate.bs.scrollspy', function () { $('#myScrollspy').on('activate.bs.scrollspy', function () {
// do something… // do something…
}) })
{% endhighlight %} {% endhighlight %}
</section> </div>
<!-- Tabs
================================================== -->
<div class="bs-docs-section">
<div class="page-header">
<h1 id="tabs">Togglable tabs <small>tab.js</small></h1>
</div>
<h2 id="tabs-examples">Example tabs</h2>
<p>Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.</p>
<div class="bs-example bs-example-tabs">
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab">Home</a></li>
<li><a href="#profile" data-toggle="tab">Profile</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#dropdown1" data-toggle="tab">@fat</a></li>
<li><a href="#dropdown2" data-toggle="tab">@mdo</a></li>
</ul>
</li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="home">
<p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
</div>
<div class="tab-pane fade" id="profile">
<p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
</div>
<div class="tab-pane fade" id="dropdown1">
<p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
</div>
<div class="tab-pane fade" id="dropdown2">
<p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
</div>
</div>
</div><!-- /example -->
<!-- Tabs
================================================== -->
<div class="bs-docs-section">
<div class="page-header">
<h1 id="tabs">Togglable tabs <small>tab.js</small></h1>
</div>
<hr class="bs-docs-separator"> <h2 id="tabs-examples">Example tabs</h2>
<p>Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.</p>
<div class="bs-example bs-example-tabs">
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab">Home</a></li>
<li><a href="#profile" data-toggle="tab">Profile</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#dropdown1" data-toggle="tab">@fat</a></li>
<li><a href="#dropdown2" data-toggle="tab">@mdo</a></li>
</ul>
</li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="home">
<p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
</div>
<div class="tab-pane fade" id="profile">
<p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
</div>
<div class="tab-pane fade" id="dropdown1">
<p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
</div>
<div class="tab-pane fade" id="dropdown2">
<p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
</div>
</div>
</div><!-- /example -->
<h2 id="tabs-usage">Usage</h2> <h2 id="tabs-usage">Usage</h2>
<p>Enable tabbable tabs via JavaScript (each tab needs to be activated individually):</p> <p>Enable tabbable tabs via JavaScript (each tab needs to be activated individually):</p>
{% highlight js %} {% highlight js %}
$('#myTab a').click(function (e) { $('#myTab a').click(function (e) {
e.preventDefault(); e.preventDefault();
...@@ -662,8 +652,8 @@ $('#myTab a:last').tab('show'); // Select last tab ...@@ -662,8 +652,8 @@ $('#myTab a:last').tab('show'); // Select last tab
$('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed) $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
{% endhighlight %} {% endhighlight %}
<h3>Markup</h3> <h3>Markup</h3>
<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> <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>
{% highlight html %} {% highlight html %}
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li><a href="#home" data-toggle="tab">Home</a></li> <li><a href="#home" data-toggle="tab">Home</a></li>
...@@ -673,13 +663,13 @@ $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed) ...@@ -673,13 +663,13 @@ $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
</ul> </ul>
{% endhighlight %} {% endhighlight %}
<p>To make tabs fade in, add <code>.fade</code> to each <code>.tab-pane</code>.</p> <p>To make tabs fade in, add <code>.fade</code> to each <code>.tab-pane</code>.</p>
<h3>Methods</h3> <h3>Methods</h3>
<h4>$().tab</h4> <h4>$().tab</h4>
<p> <p>
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. 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.
</p> </p>
{% highlight html %} {% highlight html %}
<ul class="nav nav-tabs" id="myTab"> <ul class="nav nav-tabs" id="myTab">
<li class="active"><a href="#home">Home</a></li> <li class="active"><a href="#home">Home</a></li>
...@@ -702,486 +692,487 @@ $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed) ...@@ -702,486 +692,487 @@ $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
</script> </script>
{% endhighlight %} {% endhighlight %}
<h3>Events</h3> <h3>Events</h3>
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
<tr> <tr>
<th style="width: 150px;">Event Type</th> <th style="width: 150px;">Event Type</th>
<th>Description</th> <th>Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>show</td> <td>show</td>
<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> <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>
</tr> </tr>
<tr> <tr>
<td>shown</td> <td>shown</td>
<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> <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>
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% highlight js %} {% highlight js %}
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
e.target // activated tab e.target // activated tab
e.relatedTarget // previous tab e.relatedTarget // previous tab
}) })
{% endhighlight %} {% endhighlight %}
</section> </div>
<!-- Tooltips
================================================== -->
<div class="bs-docs-section">
<div class="page-header">
<h1 id="tooltips">Tooltips <small>tooltip.js</small></h1>
</div>
<h2 id="tooltips-examples">Examples</h2> <!-- Tooltips
<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> ================================================== -->
<p>Hover over the links below to see tooltips:</p> <div class="bs-docs-section">
<div class="bs-example tooltip-demo"> <div class="page-header">
<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="Another one here too">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. <h1 id="tooltips">Tooltips <small>tooltip.js</small></h1>
</p> </div>
</div><!-- /example -->
<h3>Four directions</h3>
<div class="bs-example tooltip-demo">
<div class="bs-example-tooltips">
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</button>
</div>
</div><!-- /example -->
<div class="bs-callout bs-callout-info"> <h2 id="tooltips-examples">Examples</h2>
<h4>Tooltips in button groups and input groups require special setting</h4> <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>
<p>When using tooltips on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).</p> <p>Hover over the links below to see tooltips:</p>
</div> <div class="bs-example tooltip-demo">
<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="Another one here too">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.
</p>
</div><!-- /example -->
<hr class="bs-docs-separator"> <h3>Four directions</h3>
<div class="bs-example tooltip-demo">
<div class="bs-example-tooltips">
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</button>
</div>
</div><!-- /example -->
<div class="bs-callout bs-callout-info">
<h4>Tooltips in button groups and input groups require special setting</h4>
<p>When using tooltips on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).</p>
</div>
<h2 id="tooltips-usage">Usage</h2>
<p>Trigger the tooltip via JavaScript:</p> <h2 id="tooltips-usage">Usage</h2>
<p>Trigger the tooltip via JavaScript:</p>
{% highlight js %} {% highlight js %}
$('#example').tooltip(options) $('#example').tooltip(options)
{% endhighlight %} {% endhighlight %}
<h3>Options</h3> <h3>Options</h3>
<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> <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>
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
<tr> <tr>
<th style="width: 100px;">Name</th> <th style="width: 100px;">Name</th>
<th style="width: 100px;">type</th> <th style="width: 100px;">type</th>
<th style="width: 50px;">default</th> <th style="width: 50px;">default</th>
<th>description</th> <th>description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>animation</td> <td>animation</td>
<td>boolean</td> <td>boolean</td>
<td>true</td> <td>true</td>
<td>apply a CSS fade transition to the tooltip</td> <td>apply a CSS fade transition to the tooltip</td>
</tr> </tr>
<tr> <tr>
<td>html</td> <td>html</td>
<td>boolean</td> <td>boolean</td>
<td>false</td> <td>false</td>
<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> <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>
</tr> </tr>
<tr> <tr>
<td>placement</td> <td>placement</td>
<td>string | function</td> <td>string | function</td>
<td>'top'</td> <td>'top'</td>
<td>how to position the tooltip - top | bottom | left | right | auto. <br> When "auto" is specified, it will dynamically reorient the tooltip. For example, if placment is "auto left", the tooltip will display to the left when possible, otherwise it will display right.</td> <td>how to position the tooltip - top | bottom | left | right | auto. <br> When "auto" is specified, it will dynamically reorient the tooltip. For example, if placment is "auto left", the tooltip will display to the left when possible, otherwise it will display right.</td>
</tr> </tr>
<tr> <tr>
<td>selector</td> <td>selector</td>
<td>string</td> <td>string</td>
<td>false</td> <td>false</td>
<td>If a selector is provided, tooltip objects will be delegated to the specified targets.</td> <td>If a selector is provided, tooltip objects will be delegated to the specified targets.</td>
</tr> </tr>
<tr> <tr>
<td>title</td> <td>title</td>
<td>string | function</td> <td>string | function</td>
<td>''</td> <td>''</td>
<td>default title value if <code>title</code> tag isn't present</td> <td>default title value if <code>title</code> tag isn't present</td>
</tr> </tr>
<tr> <tr>
<td>trigger</td> <td>trigger</td>
<td>string</td> <td>string</td>
<td>'hover focus'</td> <td>'hover focus'</td>
<td>how tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td> <td>how tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td>
</tr> </tr>
<tr> <tr>
<td>delay</td> <td>delay</td>
<td>number | object</td> <td>number | object</td>
<td>0</td> <td>0</td>
<td> <td>
<p>delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p> <p>delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p> <p>If a number is supplied, delay is applied to both hide/show</p>
<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p> <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>container</td> <td>container</td>
<td>string | false</td> <td>string | false</td>
<td>false</td> <td>false</td>
<td> <td>
<p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code></p> <p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code></p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="bs-callout bs-callout-info"> <div class="bs-callout bs-callout-info">
<h4>Data attributes for individual tooltips</h4> <h4>Data attributes for individual tooltips</h4>
<p>Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.</p> <p>Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.</p>
</div> </div>
<h3>Markup</h3> <h3>Markup</h3>
{% highlight html %} {% highlight html %}
<a href="#" data-toggle="tooltip" title="first tooltip">Hover over me</a> <a href="#" data-toggle="tooltip" title="first tooltip">Hover over me</a>
{% endhighlight %} {% endhighlight %}
<h3>Methods</h3> <h3>Methods</h3>
<h4>$().tooltip(options)</h4>
<p>Attaches a tooltip handler to an element collection.</p>
<h4>.tooltip('show')</h4>
<p>Reveals an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('show'){% endhighlight %}
<h4>$().tooltip(options)</h4> <h4>.tooltip('hide')</h4>
<p>Attaches a tooltip handler to an element collection.</p> <p>Hides an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('hide'){% endhighlight %}
<h4>.tooltip('show')</h4> <h4>.tooltip('toggle')</h4>
<p>Reveals an element's tooltip.</p> <p>Toggles an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('show'){% endhighlight %} {% highlight js %}$('#element').tooltip('toggle'){% endhighlight %}
<h4>.tooltip('hide')</h4> <h4>.tooltip('destroy')</h4>
<p>Hides an element's tooltip.</p> <p>Hides and destroys an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('hide'){% endhighlight %} {% highlight js %}$('#element').tooltip('destroy'){% endhighlight %}
</div>
<h4>.tooltip('toggle')</h4>
<p>Toggles an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('toggle'){% endhighlight %}
<h4>.tooltip('destroy')</h4>
<p>Hides and destroys an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('destroy'){% endhighlight %}
</section>
<!-- Popovers
================================================== -->
<div class="bs-docs-section">
<div class="page-header">
<h1 id="popovers">Popovers <small>popover.js</small></h1>
</div>
<h2 id="popovers-examples">Examples</h2>
<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.</p>
<div class="bs-callout bs-callout-danger">
<h4>Plugin dependency</h4>
<p>Popovers require the <a href="#tooltips">tooltip plugin</a> to be included in your version of Bootstrap.</p>
</div>
<div class="bs-callout bs-callout-info">
<h4>Popovers in button groups and input groups require special setting</h4>
<p>When using popovers on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).</p>
</div>
<!-- Popovers <h3>Static popover</h3>
================================================== --> <p>Four options are available: top, right, bottom, and left aligned.</p>
<div class="bs-docs-section"> <div class="bs-example bs-example-popover">
<div class="page-header"> <div class="popover top">
<h1 id="popovers">Popovers <small>popover.js</small></h1> <div class="arrow"></div>
<h3 class="popover-title">Popover top</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div> </div>
</div>
<h2 id="popovers-examples">Examples</h2> <div class="popover right">
<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.</p> <div class="arrow"></div>
<h3 class="popover-title">Popover right</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="bs-callout bs-callout-danger"> <div class="popover bottom">
<h4>Plugin dependency</h4> <div class="arrow"></div>
<p>Popovers require the <a href="#tooltips">tooltip plugin</a> to be included in your version of Bootstrap.</p> <h3 class="popover-title">Popover bottom</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div> </div>
<div class="bs-callout bs-callout-info"> </div>
<h4>Popovers in button groups and input groups require special setting</h4>
<p>When using popovers on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).</p> <div class="popover left">
<div class="arrow"></div>
<h3 class="popover-title">Popover left</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div> </div>
</div>
<h3>Static popover</h3> <div class="clearfix"></div>
<p>Four options are available: top, right, bottom, and left aligned.</p> </div>
<div class="bs-example bs-example-popover">
<div class="popover top">
<div class="arrow"></div>
<h3 class="popover-title">Popover top</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="popover right"> <h3>Live demo</h3>
<div class="arrow"></div> <div class="bs-example" style="padding-bottom: 24px;">
<h3 class="popover-title">Popover right</h3> <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>
<div class="popover-content"> </div>
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="popover bottom"> <h4>Four directions</h4>
<div class="arrow"></div> <div class="bs-example tooltip-demo">
<h3 class="popover-title">Popover bottom</h3> <div class="bs-example-tooltips">
<div class="popover-content"> <button type="button" class="btn btn-default" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p> Popover on top
</div> </button>
</div> <button type="button" class="btn btn-default" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on right
</button>
<button type="button" class="btn btn-default" data-toggle="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on bottom
</button>
<button type="button" class="btn btn-default" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on left
</button>
</div>
</div><!-- /example -->
<div class="popover left">
<div class="arrow"></div>
<h3 class="popover-title">Popover left</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="clearfix"></div> <h2 id="popovers-usage">Usage</h2>
</div> <p>Enable popovers via JavaScript:</p>
{% highlight js %}$('#example').popover(options){% endhighlight %}
<h3>Live demo</h3> <h3>Options</h3>
<div class="bs-example" style="padding-bottom: 24px;"> <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>
<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> <table class="table table-bordered table-striped">
</div> <thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 100px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>animation</td>
<td>boolean</td>
<td>true</td>
<td>apply a CSS fade transition to the tooltip</td>
</tr>
<tr>
<td>html</td>
<td>boolean</td>
<td>false</td>
<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>
</tr>
<tr>
<td>placement</td>
<td>string | function</td>
<td>'right'</td>
<td>how to position the popover - top | bottom | left | right | auto.<br> When "auto" is specified, it will dynamically reorient the popover. For example, if placment is "auto left", the tooltip will display to the left when possible, otherwise it will display right.</td>
</tr>
<tr>
<td>selector</td>
<td>string</td>
<td>false</td>
<td>if a selector is provided, tooltip objects will be delegated to the specified targets if a selector is provided, tooltip objects will be delegated to the specified targets. in practice, this is used to enable dynamic HTML content to have popovers added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsfiddle.net/KPeKS/4/">an informative example</a>.</td>
</tr>
<tr>
<td>trigger</td>
<td>string</td>
<td>'click'</td>
<td>how popover is triggered - click | hover | focus | manual</td>
</tr>
<tr>
<td>title</td>
<td>string | function</td>
<td>''</td>
<td>default title value if <code>title</code> attribute isn't present</td>
</tr>
<tr>
<td>content</td>
<td>string | function</td>
<td>''</td>
<td>default content value if <code>data-content</code> attribute isn't present</td>
</tr>
<tr>
<td>delay</td>
<td>number | object</td>
<td>0</td>
<td>
<p>delay showing and hiding the popover (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p>
<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
</td>
</tr>
<tr>
<td>container</td>
<td>string | false</td>
<td>false</td>
<td>
<p>Appends the popover to a specific element. Example: <code>container: 'body'</code></p>
</td>
</tr>
</tbody>
</table>
<div class="bs-callout bs-callout-info">
<h4>Data attributes for individual popovers</h4>
<p>Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.</p>
</div>
<h4>Four directions</h4> <h3>Markup</h3>
<div class="bs-example tooltip-demo"> <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>
<ul class="bs-example-tooltips">
<li><a href="#" class="btn btn-default" 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>
<li><a href="#" class="btn btn-default" 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>
<li><a href="#" class="btn btn-default" 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>
<li><a href="#" class="btn btn-default" 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>
</ul>
</div><!-- /example -->
<hr class="bs-docs-separator">
<h2 id="popovers-usage">Usage</h2>
<p>Enable popovers via JavaScript:</p>
{% highlight js %}$('#example').popover(options){% endhighlight %}
<h3>Options</h3>
<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>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 100px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>animation</td>
<td>boolean</td>
<td>true</td>
<td>apply a CSS fade transition to the tooltip</td>
</tr>
<tr>
<td>html</td>
<td>boolean</td>
<td>false</td>
<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>
</tr>
<tr>
<td>placement</td>
<td>string | function</td>
<td>'right'</td>
<td>how to position the popover - top | bottom | left | right | auto.<br> When "auto" is specified, it will dynamically reorient the popover. For example, if placment is "auto left", the tooltip will display to the left when possible, otherwise it will display right.</td>
</tr>
<tr>
<td>selector</td>
<td>string</td>
<td>false</td>
<td>if a selector is provided, tooltip objects will be delegated to the specified targets if a selector is provided, tooltip objects will be delegated to the specified targets. in practice, this is used to enable dynamic HTML content to have popovers added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsfiddle.net/KPeKS/4/">an informative example</a>.</td>
</tr>
<tr>
<td>trigger</td>
<td>string</td>
<td>'click'</td>
<td>how popover is triggered - click | hover | focus | manual</td>
</tr>
<tr>
<td>title</td>
<td>string | function</td>
<td>''</td>
<td>default title value if <code>title</code> attribute isn't present</td>
</tr>
<tr>
<td>content</td>
<td>string | function</td>
<td>''</td>
<td>default content value if <code>data-content</code> attribute isn't present</td>
</tr>
<tr>
<td>delay</td>
<td>number | object</td>
<td>0</td>
<td>
<p>delay showing and hiding the popover (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p>
<p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
</td>
</tr>
<tr>
<td>container</td>
<td>string | false</td>
<td>false</td>
<td>
<p>Appends the popover to a specific element. Example: <code>container: 'body'</code></p>
</td>
</tr>
</tbody>
</table>
<div class="bs-callout bs-callout-info">
<h4>Data attributes for individual popovers</h4>
<p>Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.</p>
</div>
<h3>Markup</h3> <h3>Methods</h3>
<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> <h4>$().popover(options)</h4>
<p>Initializes popovers for an element collection.</p>
<h3>Methods</h3> <h4>.popover('show')</h4>
<h4>$().popover(options)</h4> <p>Reveals an elements popover.</p>
<p>Initializes popovers for an element collection.</p> {% highlight js %}$('#element').popover('show'){% endhighlight %}
<h4>.popover('show')</h4> <h4>.popover('hide')</h4>
<p>Reveals an elements popover.</p> <p>Hides an elements popover.</p>
{% highlight js %}$('#element').popover('show'){% endhighlight %} {% highlight js %}$('#element').popover('hide'){% endhighlight %}
<h4>.popover('hide')</h4> <h4>.popover('toggle')</h4>
<p>Hides an elements popover.</p> <p>Toggles an elements popover.</p>
{% highlight js %}$('#element').popover('hide'){% endhighlight %} {% highlight js %}$('#element').popover('toggle'){% endhighlight %}
<h4>.popover('toggle')</h4> <h4>.popover('destroy')</h4>
<p>Toggles an elements popover.</p> <p>Hides and destroys an element's popover.</p>
{% highlight js %}$('#element').popover('toggle'){% endhighlight %} {% highlight js %}$('#element').popover('destroy'){% endhighlight %}
</div>
<h4>.popover('destroy')</h4>
<p>Hides and destroys an element's popover.</p>
{% highlight js %}$('#element').popover('destroy'){% endhighlight %}
</section>
<!-- Alert
================================================== -->
<div class="bs-docs-section">
<div class="page-header">
<h1 id="alerts">Alert messages <small>alert.js</small></h1>
</div>
<!-- Alert
================================================== -->
<div class="bs-docs-section">
<div class="page-header">
<h1 id="alerts">Alert messages <small>alert.js</small></h1>
</div>
<h2 id="alerts-examples">Example alerts</h2>
<p>Add dismiss functionality to all alert messages with this plugin.</p>
<div class="bs-example">
<div class="alert fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
</div><!-- /example -->
<h2 id="alerts-examples">Example alerts</h2> <div class="bs-example">
<p>Add dismiss functionality to all alert messages with this plugin.</p> <div class="alert alert-block alert-error fade in">
<div class="bs-example"> <button type="button" class="close" data-dismiss="alert">&times;</button>
<div class="alert fade in"> <h4>Oh snap! You got an error!</h4>
<button type="button" class="close" data-dismiss="alert">&times;</button> <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>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good. <p>
</div> <a class="btn btn-danger" href="#">Take this action</a> <a class="btn btn-default" href="#">Or do this</a>
</div><!-- /example --> </p>
</div>
<div class="bs-example"> </div><!-- /example -->
<div class="alert alert-block alert-error fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Oh snap! You got an error!</h4> <h2 id="alerts-usage">Usage</h2>
<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> <p>Enable dismissal of an alert via JavaScript:</p>
<p> {% highlight js %}$(".alert").alert(){% endhighlight %}
<a class="btn btn-danger" href="#">Take this action</a> <a class="btn btn-default" href="#">Or do this</a>
</p> <h3>Markup</h3>
</div> <p>Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert close functionality.</p>
</div><!-- /example --> {% highlight html %}<a class="close" data-dismiss="alert" href="#">&times;</a>{% endhighlight %}
<h3>Methods</h3>
<hr class="bs-docs-separator">
<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>
<h2 id="alerts-usage">Usage</h2>
<p>Enable dismissal of an alert via JavaScript:</p> <h4>.alert('close')</h4>
{% highlight js %}$(".alert").alert(){% endhighlight %} <p>Closes an alert.</p>
{% highlight js %}$(".alert").alert('close'){% endhighlight %}
<h3>Markup</h3>
<p>Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert close functionality.</p>
{% highlight html %}<a class="close" data-dismiss="alert" href="#">&times;</a>{% endhighlight %} <h3>Events</h3>
<p>Bootstrap's alert class exposes a few events for hooking into alert functionality.</p>
<h3>Methods</h3> <table class="table table-bordered table-striped">
<thead>
<h4>$().alert()</h4> <tr>
<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> <th style="width: 150px;">Event Type</th>
<th>Description</th>
<h4>.alert('close')</h4> </tr>
<p>Closes an alert.</p> </thead>
{% highlight js %}$(".alert").alert('close'){% endhighlight %} <tbody>
<tr>
<td>close</td>
<h3>Events</h3> <td>This event fires immediately when the <code>close</code> instance method is called.</td>
<p>Bootstrap's alert class exposes a few events for hooking into alert functionality.</p> </tr>
<table class="table table-bordered table-striped"> <tr>
<thead> <td>closed</td>
<tr> <td>This event is fired when the alert has been closed (will wait for CSS transitions to complete).</td>
<th style="width: 150px;">Event Type</th> </tr>
<th>Description</th> </tbody>
</tr> </table>
</thead>
<tbody>
<tr>
<td>close</td>
<td>This event fires immediately when the <code>close</code> instance method is called.</td>
</tr>
<tr>
<td>closed</td>
<td>This event is fired when the alert has been closed (will wait for CSS transitions to complete).</td>
</tr>
</tbody>
</table>
{% highlight js %} {% highlight js %}
$('#my-alert').bind('closed.bs.alert', function () { $('#my-alert').bind('closed.bs.alert', function () {
// do something… // do something…
}) })
{% endhighlight %} {% endhighlight %}
</div> </div>
<!-- Buttons <!-- Buttons
================================================== --> ================================================== -->
<div class="bs-docs-section"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1 id="buttons">Buttons <small>button.js</small></h1> <h1 id="buttons">Buttons <small>button.js</small></h1>
</div> </div>
<h2 id="buttons-examples">Example uses</h2> <h2 id="buttons-examples">Example uses</h2>
<p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p> <p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p>
<h4>Stateful</h4> <h4>Stateful</h4>
<p>Add <code>data-loading-text="Loading..."</code> to use a loading state on a button.</p> <p>Add <code>data-loading-text="Loading..."</code> to use a loading state on a button.</p>
<div class="bs-example" style="padding-bottom: 24px;"> <div class="bs-example" style="padding-bottom: 24px;">
<button type="button" id="fat-btn" data-loading-text="Loading..." class="btn btn-primary"> <button type="button" id="fat-btn" data-loading-text="Loading..." class="btn btn-primary">
Loading state Loading state
</button> </button>
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<button type="button" id="fat-btn" data-loading-text="Loading..." class="btn btn-primary"> <button type="button" id="fat-btn" data-loading-text="Loading..." class="btn btn-primary">
Loading state Loading state
</button> </button>
{% endhighlight %} {% endhighlight %}
<h4>Single toggle</h4> <h4>Single toggle</h4>
<p>Add <code>data-toggle="button"</code> to activate toggling on a single button.</p> <p>Add <code>data-toggle="button"</code> to activate toggling on a single button.</p>
<div class="bs-example" style="padding-bottom: 24px;"> <div class="bs-example" style="padding-bottom: 24px;">
<button type="button" class="btn btn-primary" data-toggle="button">Single toggle</button> <button type="button" class="btn btn-primary" data-toggle="button">Single toggle</button>
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<button type="button" class="btn btn-primary" data-toggle="button">Single toggle</button> <button type="button" class="btn btn-primary" data-toggle="button">Single toggle</button>
{% endhighlight %} {% endhighlight %}
<h4>Checkbox</h4> <h4>Checkbox</h4>
<p>Add <code>data-toggle="buttons"</code> to a group of checkboxes for checkbox style toggling on btn-group.</p> <p>Add <code>data-toggle="buttons"</code> to a group of checkboxes for checkbox style toggling on btn-group.</p>
<div class="bs-example" style="padding-bottom: 24px;"> <div class="bs-example" style="padding-bottom: 24px;">
<div class="btn-group" data-toggle="buttons"> <div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary"> <label class="btn btn-primary">
<input type="checkbox"> Option 1 <input type="checkbox"> Option 1
</label> </label>
<label class="btn btn-primary"> <label class="btn btn-primary">
<input type="checkbox"> Option 2 <input type="checkbox"> Option 2
</label> </label>
<label class="btn btn-primary"> <label class="btn btn-primary">
<input type="checkbox"> Option 3 <input type="checkbox"> Option 3
</label> </label>
</div> </div>
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<div class="btn-group" data-toggle="buttons"> <div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary"> <label class="btn btn-primary">
...@@ -1196,21 +1187,21 @@ $('#my-alert').bind('closed.bs.alert', function () { ...@@ -1196,21 +1187,21 @@ $('#my-alert').bind('closed.bs.alert', function () {
</div> </div>
{% endhighlight %} {% endhighlight %}
<h4>Radio</h4> <h4>Radio</h4>
<p>Add <code>data-toggle="buttons"</code> to a group of radio inputs for radio style toggling on btn-group.</p> <p>Add <code>data-toggle="buttons"</code> to a group of radio inputs for radio style toggling on btn-group.</p>
<div class="bs-example" style="padding-bottom: 24px;"> <div class="bs-example" style="padding-bottom: 24px;">
<div class="btn-group" data-toggle="buttons"> <div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary"> <label class="btn btn-primary">
<input type="radio" name="options" id="option1"> Option 1 <input type="radio" name="options" id="option1"> Option 1
</label> </label>
<label class="btn btn-primary"> <label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Option 2 <input type="radio" name="options" id="option2"> Option 2
</label> </label>
<label class="btn btn-primary"> <label class="btn btn-primary">
<input type="radio" name="options" id="option3"> Option 3 <input type="radio" name="options" id="option3"> Option 3
</label> </label>
</div> </div>
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<div class="btn-group" data-toggle="buttons"> <div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary"> <label class="btn btn-primary">
...@@ -1226,118 +1217,115 @@ $('#my-alert').bind('closed.bs.alert', function () { ...@@ -1226,118 +1217,115 @@ $('#my-alert').bind('closed.bs.alert', function () {
{% endhighlight %} {% endhighlight %}
<hr class="bs-docs-separator"> <h2 id="buttons-usage">Usage</h2>
<p>Enable buttons via JavaScript:</p>
<h2 id="buttons-usage">Usage</h2>
<p>Enable buttons via JavaScript:</p>
{% highlight js %} {% highlight js %}
$('.nav-tabs').button() $('.nav-tabs').button()
{% endhighlight %} {% endhighlight %}
<h3>Markup</h3> <h3>Markup</h3>
<p>Data attributes are integral to the button plugin. Check out the example code below for the various markup types.</p> <p>Data attributes are integral to the button plugin. Check out the example code below for the various markup types.</p>
<h3>Options</h3> <h3>Options</h3>
<p><em>None</em></p> <p><em>None</em></p>
<h3>Methods</h3> <h3>Methods</h3>
<h4>$().button('toggle')</h4> <h4>$().button('toggle')</h4>
<p>Toggles push state. Gives the button the appearance that it has been activated.</p> <p>Toggles push state. Gives the button the appearance that it has been activated.</p>
<div class="bs-callout bs-callout-info"> <div class="bs-callout bs-callout-info">
<h4>Auto toggling</h4> <h4>Auto toggling</h4>
<p>You can enable auto toggling of a button by using the <code>data-toggle</code> attribute.</p> <p>You can enable auto toggling of a button by using the <code>data-toggle</code> attribute.</p>
</div> </div>
{% highlight html %} {% highlight html %}
<button type="button" class="btn" data-toggle="button">...</button> <button type="button" class="btn" data-toggle="button">...</button>
{% endhighlight %} {% endhighlight %}
<h4>$().button('loading')</h4> <h4>$().button('loading')</h4>
<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>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> </p>
{% highlight html %} {% highlight html %}
<button type="button" class="btn" data-loading-text="loading stuff...">...</button> <button type="button" class="btn" data-loading-text="loading stuff...">...</button>
{% endhighlight %} {% endhighlight %}
<div class="bs-callout bs-callout-danger"> <div class="bs-callout bs-callout-danger">
<h4>Cross-browser compatibility</h4> <h4>Cross-browser compatibility</h4>
<p><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>.</p> <p><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>.</p>
</div> </div>
<h4>$().button('reset')</h4> <h4>$().button('reset')</h4>
<p>Resets button state - swaps text to original text.</p> <p>Resets button state - swaps text to original text.</p>
<h4>$().button(string)</h4> <h4>$().button(string)</h4>
<p>Resets button state - swaps text to any data defined text state.</p> <p>Resets button state - swaps text to any data defined text state.</p>
{% highlight html %} {% highlight html %}
<button type="button" class="btn" data-complete-text="finished!" >...</button> <button type="button" class="btn" data-complete-text="finished!" >...</button>
<script> <script>
$('.btn').button('complete') $('.btn').button('complete')
</script> </script>
{% endhighlight %} {% endhighlight %}
</div> </div>
<!-- Collapse <!-- Collapse
================================================== --> ================================================== -->
<div class="bs-docs-section"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1 id="collapse">Collapse <small>collapse.js</small></h1> <h1 id="collapse">Collapse <small>collapse.js</small></h1>
</div> </div>
<h3>About</h3> <h3>About</h3>
<p>Get base styles and flexible support for collapsible components like accordions and navigation.</p> <p>Get base styles and flexible support for collapsible components like accordions and navigation.</p>
<div class="bs-callout bs-callout-danger"> <div class="bs-callout bs-callout-danger">
<h4>Plugin dependency</h4> <h4>Plugin dependency</h4>
<p>Collapse requires the <a href="#transitions">transitions plugin</a> to be included in your version of Bootstrap.</p> <p>Collapse requires the <a href="#transitions">transitions plugin</a> to be included in your version of Bootstrap.</p>
</div> </div>
<h2 id="collapse-examples">Example accordion</h2>
<p>Using the collapse plugin, we built a simple accordion style widget:</p>
<h2 id="collapse-examples">Example accordion</h2> <div class="bs-example">
<p>Using the collapse plugin, we built a simple accordion style widget:</p> <div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="bs-example"> <div class="accordion-heading">
<div class="accordion" id="accordion2"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
<div class="accordion-group"> Collapsible Group Item #1
<div class="accordion-heading"> </a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne"> </div>
Collapsible Group Item #1 <div id="collapseOne" class="accordion-body collapse in">
</a> <div class="accordion-inner">
</div> 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.
<div id="collapseOne" class="accordion-body collapse in"> </div>
<div class="accordion-inner"> </div>
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. </div>
</div> <div class="accordion-group">
</div> <div class="accordion-heading">
</div> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
<div class="accordion-group"> Collapsible Group Item #2
<div class="accordion-heading"> </a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> </div>
Collapsible Group Item #2 <div id="collapseTwo" class="accordion-body collapse">
</a> <div class="accordion-inner">
</div> 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.
<div id="collapseTwo" class="accordion-body collapse"> </div>
<div class="accordion-inner"> </div>
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. </div>
</div> <div class="accordion-group">
</div> <div class="accordion-heading">
</div> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree">
<div class="accordion-group"> Collapsible Group Item #3
<div class="accordion-heading"> </a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree"> </div>
Collapsible Group Item #3 <div id="collapseThree" class="accordion-body collapse">
</a> <div class="accordion-inner">
</div> 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.
<div id="collapseThree" class="accordion-body collapse"> </div>
<div class="accordion-inner"> </div>
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. </div>
</div> </div>
</div> </div><!-- /example -->
</div>
</div>
</div><!-- /example -->
{% highlight html %} {% highlight html %}
<div class="accordion" id="accordion2"> <div class="accordion" id="accordion2">
<div class="accordion-group"> <div class="accordion-group">
...@@ -1379,7 +1367,7 @@ $('.nav-tabs').button() ...@@ -1379,7 +1367,7 @@ $('.nav-tabs').button()
</div> </div>
{% endhighlight %} {% endhighlight %}
<p>You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.</p> <p>You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.</p>
{% highlight html %} {% highlight html %}
<button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo"> <button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo">
simple collapsible simple collapsible
...@@ -1389,142 +1377,139 @@ $('.nav-tabs').button() ...@@ -1389,142 +1377,139 @@ $('.nav-tabs').button()
{% endhighlight %} {% endhighlight %}
<hr class="bs-docs-separator"> <h2 id="collapse-usage">Usage</h2>
<h2 id="collapse-usage">Usage</h2> <h3>Via data attributes</h3>
<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>
<h3>Via data attributes</h3> <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>
<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>
<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>
<h3>Via JavaScript</h3> <h3>Via JavaScript</h3>
<p>Enable manually with:</p> <p>Enable manually with:</p>
{% highlight js %} {% highlight js %}
$(".collapse").collapse() $(".collapse").collapse()
{% endhighlight %} {% endhighlight %}
<h3>Options</h3> <h3>Options</h3>
<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> <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>
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
<tr> <tr>
<th style="width: 100px;">Name</th> <th style="width: 100px;">Name</th>
<th style="width: 50px;">type</th> <th style="width: 50px;">type</th>
<th style="width: 50px;">default</th> <th style="width: 50px;">default</th>
<th>description</th> <th>description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>parent</td> <td>parent</td>
<td>selector</td> <td>selector</td>
<td>false</td> <td>false</td>
<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> <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>
</tr> </tr>
<tr> <tr>
<td>toggle</td> <td>toggle</td>
<td>boolean</td> <td>boolean</td>
<td>true</td> <td>true</td>
<td>Toggles the collapsible element on invocation</td> <td>Toggles the collapsible element on invocation</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3>Methods</h3> <h3>Methods</h3>
<h4>.collapse(options)</h4> <h4>.collapse(options)</h4>
<p>Activates your content as a collapsible element. Accepts an optional options <code>object</code>. <p>Activates your content as a collapsible element. Accepts an optional options <code>object</code>.
{% highlight js %} {% highlight js %}
$('#myCollapsible').collapse({ $('#myCollapsible').collapse({
toggle: false toggle: false
}) })
{% endhighlight %} {% endhighlight %}
<h4>.collapse('toggle')</h4> <h4>.collapse('toggle')</h4>
<p>Toggles a collapsible element to shown or hidden.</p> <p>Toggles a collapsible element to shown or hidden.</p>
<h4>.collapse('show')</h4> <h4>.collapse('show')</h4>
<p>Shows a collapsible element.</p> <p>Shows a collapsible element.</p>
<h4>.collapse('hide')</h4> <h4>.collapse('hide')</h4>
<p>Hides a collapsible element.</p> <p>Hides a collapsible element.</p>
<h3>Events</h3> <h3>Events</h3>
<p>Bootstrap's collapse class exposes a few events for hooking into collapse functionality.</p> <p>Bootstrap's collapse class exposes a few events for hooking into collapse functionality.</p>
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
<tr> <tr>
<th style="width: 150px;">Event Type</th> <th style="width: 150px;">Event Type</th>
<th>Description</th> <th>Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>show</td> <td>show</td>
<td>This event fires immediately when the <code>show</code> instance method is called.</td> <td>This event fires immediately when the <code>show</code> instance method is called.</td>
</tr> </tr>
<tr> <tr>
<td>shown</td> <td>shown</td>
<td>This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete).</td> <td>This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete).</td>
</tr> </tr>
<tr> <tr>
<td>hide</td> <td>hide</td>
<td> <td>
This event is fired immediately when the <code>hide</code> method has been called. This event is fired immediately when the <code>hide</code> method has been called.
</td> </td>
</tr> </tr>
<tr> <tr>
<td>hidden</td> <td>hidden</td>
<td>This event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete).</td> <td>This event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete).</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% highlight js %} {% highlight js %}
$('#myCollapsible').on('hidden.bs.collapse', function () { $('#myCollapsible').on('hidden.bs.collapse', function () {
// do something… // do something…
}) })
{% endhighlight %} {% endhighlight %}
</section> </div>
<!-- Carousel <!-- Carousel
================================================== --> ================================================== -->
<div class="bs-docs-section"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1 id="carousel">Carousel <small>carousel.js</small></h1> <h1 id="carousel">Carousel <small>carousel.js</small></h1>
</div> </div>
<h2 id="carousel-examples">Examples</h2> <h2 id="carousel-examples">Examples</h2>
<p>The slideshow below shows a generic plugin and component for cycling through elements like a carousel.</p> <p>The slideshow below shows a generic plugin and component for cycling through elements like a carousel.</p>
<div class="bs-example"> <div class="bs-example">
<div id="carousel-example-generic" class="carousel slide bs-docs-carousel-example"> <div id="carousel-example-generic" class="carousel slide bs-docs-carousel-example">
<ol class="carousel-indicators"> <ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li> <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li> <li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li> <li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol> </ol>
<div class="carousel-inner"> <div class="carousel-inner">
<div class="item active"> <div class="item active">
<img data-src="holder.js/900x500/auto/#777:#555/text:First slide" alt=""> <img data-src="holder.js/900x500/auto/#777:#555/text:First slide" alt="">
</div> </div>
<div class="item"> <div class="item">
<img data-src="holder.js/900x500/auto/#666:#444/text:Second slide" alt=""> <img data-src="holder.js/900x500/auto/#666:#444/text:Second slide" alt="">
</div> </div>
<div class="item"> <div class="item">
<img data-src="holder.js/900x500/auto/#555:#333/text:Third slide" alt=""> <img data-src="holder.js/900x500/auto/#555:#333/text:Third slide" alt="">
</div> </div>
</div> </div>
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev"> <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="icon-prev"></span> <span class="icon-prev"></span>
</a> </a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next"> <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="icon-next"></span> <span class="icon-next"></span>
</a> </a>
</div> </div>
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<div id="carousel-example-generic" class="carousel slide"> <div id="carousel-example-generic" class="carousel slide">
<!-- Indicators --> <!-- Indicators -->
...@@ -1559,46 +1544,46 @@ $('#myCollapsible').on('hidden.bs.collapse', function () { ...@@ -1559,46 +1544,46 @@ $('#myCollapsible').on('hidden.bs.collapse', function () {
<p>With <a href="/css/#glyphicons">Glyphicons</a> available, you may choose to style the left and right toggle buttons with <code>.glyphicon .glyphicon-chevron-left</code> and <code>.glyphicon .glyphicon-chevron-right</code>.</p> <p>With <a href="/css/#glyphicons">Glyphicons</a> available, you may choose to style the left and right toggle buttons with <code>.glyphicon .glyphicon-chevron-left</code> and <code>.glyphicon .glyphicon-chevron-right</code>.</p>
</div> </div>
<h3>Optional captions</h3> <h3>Optional captions</h3>
<p>Add captions to your slides easily with the <code>.carousel-caption</code> element within any <code>.item</code>. Place just about any optional HTML within there and it will be automatically aligned and formatted.</p> <p>Add captions to your slides easily with the <code>.carousel-caption</code> element within any <code>.item</code>. Place just about any optional HTML within there and it will be automatically aligned and formatted.</p>
<div class="bs-example"> <div class="bs-example">
<div id="carousel-example-captions" class="carousel slide bs-docs-carousel-example"> <div id="carousel-example-captions" class="carousel slide bs-docs-carousel-example">
<ol class="carousel-indicators"> <ol class="carousel-indicators">
<li data-target="#carousel-example-captions" data-slide-to="0" class="active"></li> <li data-target="#carousel-example-captions" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-captions" data-slide-to="1"></li> <li data-target="#carousel-example-captions" data-slide-to="1"></li>
<li data-target="#carousel-example-captions" data-slide-to="2"></li> <li data-target="#carousel-example-captions" data-slide-to="2"></li>
</ol> </ol>
<div class="carousel-inner"> <div class="carousel-inner">
<div class="item active"> <div class="item active">
<img data-src="holder.js/900x500/auto/#777:#777" alt=""> <img data-src="holder.js/900x500/auto/#777:#777" alt="">
<div class="carousel-caption"> <div class="carousel-caption">
<h3>First slide label</h3> <h3>First slide label</h3>
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p> <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<img data-src="holder.js/900x500/auto/#666:#666" alt=""> <img data-src="holder.js/900x500/auto/#666:#666" alt="">
<div class="carousel-caption"> <div class="carousel-caption">
<h3>Second slide label</h3> <h3>Second slide label</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<img data-src="holder.js/900x500/auto/#555:#5555" alt=""> <img data-src="holder.js/900x500/auto/#555:#5555" alt="">
<div class="carousel-caption"> <div class="carousel-caption">
<h3>Third slide label</h3> <h3>Third slide label</h3>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p> <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
</div> </div>
</div> </div>
</div> </div>
<a class="left carousel-control" href="#carousel-example-captions" data-slide="prev"> <a class="left carousel-control" href="#carousel-example-captions" data-slide="prev">
<span class="icon-prev"></span> <span class="icon-prev"></span>
</a> </a>
<a class="right carousel-control" href="#carousel-example-captions" data-slide="next"> <a class="right carousel-control" href="#carousel-example-captions" data-slide="next">
<span class="icon-next"></span> <span class="icon-next"></span>
</a> </a>
</div> </div>
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<div class="item active"> <div class="item active">
<img src="..." alt=""> <img src="..." alt="">
...@@ -1610,134 +1595,130 @@ $('#myCollapsible').on('hidden.bs.collapse', function () { ...@@ -1610,134 +1595,130 @@ $('#myCollapsible').on('hidden.bs.collapse', function () {
{% endhighlight %} {% endhighlight %}
<h2 id="carousel-usage">Usage</h2>
<hr class="bs-docs-separator"> <h3>Via data attributes</h3>
<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 its 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 shifts the slide position to a particular index beginning with <code>0</code>.</p>
<h2 id="carousel-usage">Usage</h2>
<h3>Via data attributes</h3>
<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 its 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 shifts the slide position to a particular index beginning with <code>0</code>.</p>
<h3>Via JavaScript</h3> <h3>Via JavaScript</h3>
<p>Call carousel manually with:</p> <p>Call carousel manually with:</p>
{% highlight js %} {% highlight js %}
$('.carousel').carousel() $('.carousel').carousel()
{% endhighlight %} {% endhighlight %}
<h3>Options</h3> <h3>Options</h3>
<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-interval=""</code>.</p> <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-interval=""</code>.</p>
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
<tr> <tr>
<th style="width: 100px;">Name</th> <th style="width: 100px;">Name</th>
<th style="width: 50px;">type</th> <th style="width: 50px;">type</th>
<th style="width: 50px;">default</th> <th style="width: 50px;">default</th>
<th>description</th> <th>description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>interval</td> <td>interval</td>
<td>number</td> <td>number</td>
<td>5000</td> <td>5000</td>
<td>The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.</td> <td>The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.</td>
</tr> </tr>
<tr> <tr>
<td>pause</td> <td>pause</td>
<td>string</td> <td>string</td>
<td>"hover"</td> <td>"hover"</td>
<td>Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.</td> <td>Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3>Methods</h3> <h3>Methods</h3>
<h4>.carousel(options)</h4> <h4>.carousel(options)</h4>
<p>Initializes the carousel with an optional options <code>object</code> and starts cycling through items.</p> <p>Initializes the carousel with an optional options <code>object</code> and starts cycling through items.</p>
{% highlight html %} {% highlight html %}
$('.carousel').carousel({ $('.carousel').carousel({
interval: 2000 interval: 2000
}) })
{% endhighlight %} {% endhighlight %}
<h4>.carousel('cycle')</h4> <h4>.carousel('cycle')</h4>
<p>Cycles through the carousel items from left to right.</p> <p>Cycles through the carousel items from left to right.</p>
<h4>.carousel('pause')</h4> <h4>.carousel('pause')</h4>
<p>Stops the carousel from cycling through items.</p> <p>Stops the carousel from cycling through items.</p>
<h4>.carousel(number)</h4> <h4>.carousel(number)</h4>
<p>Cycles the carousel to a particular frame (0 based, similar to an array).</p> <p>Cycles the carousel to a particular frame (0 based, similar to an array).</p>
<h4>.carousel('prev')</h4> <h4>.carousel('prev')</h4>
<p>Cycles to the previous item.</p> <p>Cycles to the previous item.</p>
<h4>.carousel('next')</h4> <h4>.carousel('next')</h4>
<p>Cycles to the next item.</p> <p>Cycles to the next item.</p>
<h3>Events</h3> <h3>Events</h3>
<p>Bootstrap's carousel class exposes two events for hooking into carousel functionality.</p> <p>Bootstrap's carousel class exposes two events for hooking into carousel functionality.</p>
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
<tr> <tr>
<th style="width: 150px;">Event Type</th> <th style="width: 150px;">Event Type</th>
<th>Description</th> <th>Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>slide</td> <td>slide</td>
<td>This event fires immediately when the <code>slide</code> instance method is invoked.</td> <td>This event fires immediately when the <code>slide</code> instance method is invoked.</td>
</tr> </tr>
<tr> <tr>
<td>slid</td> <td>slid</td>
<td>This event is fired when the carousel has completed its slide transition.</td> <td>This event is fired when the carousel has completed its slide transition.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% highlight js %} {% highlight js %}
$('#myCarousel').on('slide.bs.carousel', function () { $('#myCarousel').on('slide.bs.carousel', function () {
// do something… // do something…
}) })
{% endhighlight %} {% endhighlight %}
</section> </div>
<!-- Affix <!-- Affix
================================================== --> ================================================== -->
<div class="bs-docs-section"> <div class="bs-docs-section">
<div class="page-header"> <div class="page-header">
<h1 id="affix">Affix <small>affix.js</small></h1> <h1 id="affix">Affix <small>affix.js</small></h1>
</div> </div>
<h2 id="affix-examples">Example</h2> <h2 id="affix-examples">Example</h2>
<p>The subnavigation on the left is a live demo of the affix plugin.</p> <p>The subnavigation on the left is a live demo of the affix plugin.</p>
<hr class="bs-docs-separator"> <hr class="bs-docs-separator">
<h2 id="affix-usage">Usage</h2> <h2 id="affix-usage">Usage</h2>
<h3>Via data attributes</h3> <h3>Via data attributes</h3>
<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> <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>
{% highlight html %} {% highlight html %}
<div data-spy="affix" data-offset-top="200">...</div> <div data-spy="affix" data-offset-top="200">...</div>
{% endhighlight %} {% endhighlight %}
<div class="bs-callout bs-callout-warning"> <div class="bs-callout bs-callout-warning">
<h4>Requires independent styling ;)</h4> <h4>Requires independent styling ;)</h4>
<p> <p>
Affix toggles between three states/classes: <code>affix</code>, <code>affix-top</code>, and <code>affix-bottom</code>. You must provide the styles for these classes yourself (independent of this plugin). Affix toggles between three states/classes: <code>affix</code>, <code>affix-top</code>, and <code>affix-bottom</code>. You must provide the styles for these classes yourself (independent of this plugin).
The <code>affix-top</code> class should be in the regular flow of the document. The <code>affix</code> class should be fixed to the page. And <code>affix-bottom</code> should be positioned absolute. Note, <code>affix-bottom</code> is special in that the plugin will place the element with js relative to the <code>offset: { bottom: number }</code> option you've provided. The <code>affix-top</code> class should be in the regular flow of the document. The <code>affix</code> class should be fixed to the page. And <code>affix-bottom</code> should be positioned absolute. Note, <code>affix-bottom</code> is special in that the plugin will place the element with js relative to the <code>offset: { bottom: number }</code> option you've provided.
</p> </p>
</div> </div>
<h3>Via JavaScript</h3> <h3>Via JavaScript</h3>
<p>Call the affix plugin via JavaScript:</p> <p>Call the affix plugin via JavaScript:</p>
{% highlight js %} {% highlight js %}
$('#myAffix').affix({ $('#myAffix').affix({
offset: { offset: {
...@@ -1750,25 +1731,25 @@ $('#myCarousel').on('slide.bs.carousel', function () { ...@@ -1750,25 +1731,25 @@ $('#myCarousel').on('slide.bs.carousel', function () {
{% endhighlight %} {% endhighlight %}
<h3>Options</h3> <h3>Options</h3>
<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> <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>
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
<tr> <tr>
<th style="width: 100px;">Name</th> <th style="width: 100px;">Name</th>
<th style="width: 100px;">type</th> <th style="width: 100px;">type</th>
<th style="width: 50px;">default</th> <th style="width: 50px;">default</th>
<th>description</th> <th>description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>offset</td> <td>offset</td>
<td>number | function | object</td> <td>number | function | object</td>
<td>10</td> <td>10</td>
<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 provide a unique, bottom and top offset just provide an object <code>offset: { top: 10 }</code> or <code>offset: { top: 10, bottom: 5 }</code>. Use a function when you need to dynamically calculate an offset.</td> <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 provide a unique, bottom and top offset just provide an object <code>offset: { top: 10 }</code> or <code>offset: { top: 10, bottom: 5 }</code>. Use a function when you need to dynamically calculate an offset.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</section> </div>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment