{{_i}}Bring Bootstrap's components to life—now with 12 custom jQuery plugins.{{/i}}
{{_i}}A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.{{/i}}
{{_i}}Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.{{/i}}
{{_i}}Use scrollspy to automatically update the links in your navbar to show the current active link based on scroll position.{{/i}}
{{_i}}Use this plugin to make tabs and pills more useful by allowing them to toggle through tabbable panes of local content.{{/i}}
{{_i}}A new take on the jQuery Tipsy plugin, Tooltips don't rely on images—they use CSS3 for animations and data-attributes for local title storage.{{/i}}
{{_i}}Add small overlays of content, like those on the iPad, to any element for housing secondary information.{{/i}}
* {{_i}}Requires Tooltips to be included{{/i}}
{{_i}}The alert plugin is a tiny class for adding close functionality to alerts.{{/i}}
{{_i}}Do more with buttons. Control button states or create groups of buttons for more components like toolbars.{{/i}}
{{_i}}Get base styles and flexible support for collapsible components like accordions and navigation.{{/i}}
{{_i}}Create a merry-go-round of any content you wish to provide an interactive slideshow of content.{{/i}}
{{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}
{{_i}}For simple transition effects, include bootstrap-transition.js once to slide in modals or fade out alerts.{{/i}}
* {{_i}}Required for animation in plugins{{/i}}
{{_i}}A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.{{/i}}
{{_i}}Download file{{/i}}{{_i}}Below is a statically rendered modal.{{/i}}
{{_i}}One fine body…{{/i}}
{{_i}}Toggle a modal via javascript by clicking the button below. It will slide down and fade in from the top of the page.{{/i}}
{{_i}}Launch demo modal{{/i}}{{_i}}Call the modal via javascript:{{/i}}
$('#myModal').modal(options)
{{_i}}Name{{/i}} | {{_i}}type{{/i}} | {{_i}}default{{/i}} | {{_i}}description{{/i}} |
---|---|---|---|
{{_i}}backdrop{{/i}} | {{_i}}boolean{{/i}} | {{_i}}true{{/i}} | {{_i}}Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click.{{/i}} |
{{_i}}keyboard{{/i}} | {{_i}}boolean{{/i}} | {{_i}}true{{/i}} | {{_i}}Closes the modal when escape key is pressed{{/i}} |
{{_i}}show{{/i}} | {{_i}}boolean{{/i}} | {{_i}}true{{/i}} | {{_i}}Shows the modal when initialized.{{/i}} |
{{_i}}You can activate modals on your page easily without having to write a single line of javascript. Just set data-toggle="modal"
on a controller element with a data-target="#foo"
or href="#foo"
which corresponds to a modal element id, and when clicked, it will launch your modal.
Also, to add options to your modal instance, just include them as additional data attributes on either the control element or the modal markup itself.{{/i}}
<a class="btn" data-toggle="modal" href="#myModal" >{{_i}}Launch Modal{{/i}}</a>
<div class="modal hide" id="myModal"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h3>Modal header</h3> </div> <div class="modal-body"> <p>{{_i}}One fine body…{{/i}}</p> </div> <div class="modal-footer"> <a href="#" class="btn" data-dismiss="modal">{{_i}}Close{{/i}}</a> <a href="#" class="btn btn-primary">{{_i}}Save changes{{/i}}</a> </div> </div>
.fade
class to the .modal
element (refer to the demo to see this in action) and include bootstrap-transition.js.{{/i}}
{{_i}}Activates your content as a modal. Accepts an optional options object
.{{/i}}
$('#myModal').modal({ keyboard: false })
{{_i}}Manually toggles a modal.{{/i}}
$('#myModal').modal('toggle')
{{_i}}Manually opens a modal.{{/i}}
$('#myModal').modal('show')
{{_i}}Manually hides a modal.{{/i}}
$('#myModal').modal('hide')
{{_i}}Bootstrap's modal class exposes a few events for hooking into modal functionality.{{/i}}
{{_i}}Event{{/i}} | {{_i}}Description{{/i}} |
---|---|
{{_i}}show{{/i}} | {{_i}}This event fires immediately when the show instance method is called.{{/i}} |
{{_i}}shown{{/i}} | {{_i}}This event is fired when the modal has been made visible to the user (will wait for css transitions to complete).{{/i}} |
{{_i}}hide{{/i}} | {{_i}}This event is fired immediately when the hide instance method has been called.{{/i}} |
{{_i}}hidden{{/i}} | {{_i}}This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).{{/i}} |
$('#myModal').on('hidden', function () { // {{_i}}do something…{{/i}} })
{{_i}}Add dropdown menus to nearly anything in Bootstrap with this simple plugin. Bootstrap features full dropdown menu support on in the navbar, tabs, and pills.{{/i}}
{{_i}}Download file{{/i}}{{_i}}Click on the dropdown nav links in the navbar and pills below to test dropdowns.{{/i}}
{{_i}}Call the dropdowns via javascript:{{/i}}
$('.dropdown-toggle').dropdown()
{{_i}}To quickly add dropdown functionality to any element just add data-toggle="dropdown"
and any valid bootstrap dropdown will automatically be activated.{{/i}}
data-target="#fat"
or href="#fat"
.{{/i}}
<ul class="nav nav-pills"> <li class="active"><a href="#">Regular link</a></li> <li class="dropdown" id="menu1"> <a class="dropdown-toggle" data-toggle="dropdown" href="#menu1"> {{_i}}Dropdown{{/i}} <b class="caret"></b> </a> <ul class="dropdown-menu"> <li><a href="#">{{_i}}Action{{/i}}</a></li> <li><a href="#">{{_i}}Another action{{/i}}</a></li> <li><a href="#">{{_i}}Something else here{{/i}}</a></li> <li class="divider"></li> <li><a href="#">{{_i}}Separated link{{/i}}</a></li> </ul> </li> ... </ul>
{{_i}}To keep URLs intact, use the data-target
attribute instead of href="#"
.{{/i}}
<ul class="nav nav-pills"> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="path/to/page.html"> {{_i}}Dropdown{{/i}} <b class="caret"></b> </a> <ul class="dropdown-menu"> ... </ul> </li> </ul>
{{_i}}A programatic api for activating menus for a given navbar or tabbed navigation.{{/i}}
{{_i}}The ScrollSpy plugin is for automatically updating nav targets based on scroll position.{{/i}}
{{_i}}Download file{{/i}}{{_i}}Scroll the area below and watch the navigation update. The dropdown sub items will be highlighted as well. Try it!{{/i}}
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.
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.
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.
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.
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.
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.
{{_i}}Call the scrollspy via javascript:{{/i}}
$('#navbar').scrollspy()
{{_i}}To easily add scrollspy behavior to your topbar navigation, just add data-spy="scroll"
to the element you want to spy on (most typically this would be the body).{{/i}}
<body data-spy="scroll" >...</body>
<a href="#home">home</a>
must correspond to something in the dom like <div id="home"></div>
.{{/i}}
{{_i}}When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:{{/i}}
$('[data-spy="scroll"]').each(function () { var $spy = $(this).scrollspy('refresh') });
{{_i}}Name{{/i}} | {{_i}}type{{/i}} | {{_i}}default{{/i}} | {{_i}}description{{/i}} |
---|---|---|---|
{{_i}}offset{{/i}} | {{_i}}number{{/i}} | {{_i}}10{{/i}} | {{_i}}Pixels to offset from top when calculating position of scroll.{{/i}} |
{{_i}}Event{{/i}} | {{_i}}Description{{/i}} |
---|---|
{{_i}}activate{{/i}} | {{_i}}This event fires whenever a new item becomes activated by the scrollspy.{{/i}} |
{{_i}}This plugin adds quick, dynamic tab and pill functionality for transitioning through local content.{{/i}}
{{_i}}Download file{{/i}}{{_i}}Click the tabs below to toggle between hidden panes, even via dropdown menus.{{/i}}
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.
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.
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.
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.
{{_i}}Enable tabbable tabs via javascript (each tab needs to be activated individually):{{/i}}
$('#myTab a').click(function (e) { e.preventDefault(); $(this).tab('show'); })
{{_i}}You can activate individual tabs in several ways:{{/i}}
$('#myTab a[href="#profile"]').tab('show'); // Select tab by name $('#myTab a:first').tab('show'); // Select first tab $('#myTab a:last').tab('show'); // Select last tab $('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
{{_i}}You can activate a tab or pill navigation without writing any javascript by simply specifying data-toggle="tab"
or data-toggle="pill"
on an element. Adding the nav
and nav-tabs
classes to the tab ul
will apply the bootstrap tab styling.{{/i}}
<ul class="nav nav-tabs"> <li><a href="#home" data-toggle="tab">{{_i}}Home{{/i}}</a></li> <li><a href="#profile" data-toggle="tab">{{_i}}Profile{{/i}}</a></li> <li><a href="#messages" data-toggle="tab">{{_i}}Messages{{/i}}</a></li> <li><a href="#settings" data-toggle="tab">{{_i}}Settings{{/i}}</a></li> </ul>
{{_i}}Activates a tab element and content container. Tab should have either a data-target
or an href
targeting a container node in the DOM.{{/i}}
<ul class="nav nav-tabs" id="myTab"> <li class="active"><a href="#home">{{_i}}Home{{/i}}</a></li> <li><a href="#profile">{{_i}}Profile{{/i}}</a></li> <li><a href="#messages">{{_i}}Messages{{/i}}</a></li> <li><a href="#settings">{{_i}}Settings{{/i}}</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="home">...</div> <div class="tab-pane" id="profile">...</div> <div class="tab-pane" id="messages">...</div> <div class="tab-pane" id="settings">...</div> </div> <script> $(function () { $('#myTab a:last').tab('show'); }) </script>
{{_i}}Event{{/i}} | {{_i}}Description{{/i}} |
---|---|
{{_i}}show{{/i}} | {{_i}}This event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.{{/i}} |
{{_i}}shown{{/i}} | {{_i}}This event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.{{/i}} |
$('a[data-toggle="tab"]').on('shown', function (e) { e.target // activated tab e.relatedTarget // previous tab })
{{_i}}Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use css3 for animations, and data-attributes for local title storage.{{/i}}
{{_i}}Download file{{/i}}{{_i}}Hover over the links below to see tooltips:{{/i}}
{{_i}}Tight pants next level keffiyeh you probably 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 have 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 whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.{{/i}}
{{_i}}Trigger the tooltip via javascript:{{/i}}
$('#example').tooltip({{_i}}options{{/i}})
{{_i}}Name{{/i}} | {{_i}}type{{/i}} | {{_i}}default{{/i}} | {{_i}}description{{/i}} |
---|---|---|---|
{{_i}}animation{{/i}} | {{_i}}boolean{{/i}} | true | {{_i}}apply a css fade transition to the tooltip{{/i}} |
{{_i}}placement{{/i}} | {{_i}}string|function{{/i}} | 'top' | {{_i}}how to position the tooltip{{/i}} - top | bottom | left | right |
{{_i}}selector{{/i}} | {{_i}}string{{/i}} | false | {{_i}}If a selector is provided, tooltip objects will be delegated to the specified targets.{{/i}} |
{{_i}}title{{/i}} | {{_i}}string | function{{/i}} | '' | {{_i}}default title value if `title` tag isn't present{{/i}} |
{{_i}}trigger{{/i}} | {{_i}}string{{/i}} | 'hover' | {{_i}}how tooltip is triggered{{/i}} - hover | focus | manual |
{{_i}}delay{{/i}} | {{_i}}number | object{{/i}} | 0 |
{{_i}}delay showing and hiding the tooltip (ms) - does not apply to manual trigger type{{/i}} {{_i}}If a number is supplied, delay is applied to both hide/show{{/i}} {{_i}}Object structure is: |
{{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}}
<a href="#" rel="tooltip" title="{{_i}}first tooltip{{/i}}">{{_i}}hover over me{{/i}}</a>
{{_i}}Attaches a tooltip handler to an element collection.{{/i}}
{{_i}}Reveals an element's tooltip.{{/i}}
$('#element').tooltip('show')
{{_i}}Hides an element's tooltip.{{/i}}
$('#element').tooltip('hide')
{{_i}}Toggles an element's tooltip.{{/i}}
$('#element').tooltip('toggle')
{{_i}}Add small overlays of content, like those on the iPad, to any element for housing secondary information.{{/i}}
* {{_i}}Requires Tooltip to be included{{/i}}
{{_i}}Download file{{/i}}{{_i}}Hover over the button to trigger the popover.{{/i}}
{{_i}}Enable popovers via javascript:{{/i}}
$('#example').popover({{_i}}options{{/i}})
{{_i}}Name{{/i}} | {{_i}}type{{/i}} | {{_i}}default{{/i}} | {{_i}}description{{/i}} |
---|---|---|---|
{{_i}}animation{{/i}} | {{_i}}boolean{{/i}} | true | {{_i}}apply a css fade transition to the tooltip{{/i}} |
{{_i}}placement{{/i}} | {{_i}}string|function{{/i}} | 'right' | {{_i}}how to position the popover{{/i}} - top | bottom | left | right |
{{_i}}selector{{/i}} | {{_i}}string{{/i}} | false | {{_i}}if a selector is provided, tooltip objects will be delegated to the specified targets{{/i}} |
{{_i}}trigger{{/i}} | {{_i}}string{{/i}} | 'hover' | {{_i}}how tooltip is triggered{{/i}} - hover | focus | manual |
{{_i}}title{{/i}} | {{_i}}string | function{{/i}} | '' | {{_i}}default title value if `title` attribute isn't present{{/i}} |
{{_i}}content{{/i}} | {{_i}}string | function{{/i}} | '' | {{_i}}default content value if `data-content` attribute isn't present{{/i}} |
{{_i}}delay{{/i}} | {{_i}}number | object{{/i}} | 0 |
{{_i}}delay showing and hiding the popover (ms) - does not apply to manual trigger type{{/i}} {{_i}}If a number is supplied, delay is applied to both hide/show{{/i}} {{_i}}Object structure is: |
{{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}}
{{_i}}Initializes popovers for an element collection.{{/i}}
{{_i}}Reveals an elements popover.{{/i}}
$('#element').popover('show')
{{_i}}Hides an elements popover.{{/i}}
$('#element').popover('hide')
{{_i}}Toggles an elements popover.{{/i}}
$('#element').popover('toggle')
{{_i}}The alert plugin is a tiny class for adding close functionality to alerts.{{/i}}
{{_i}}Download{{/i}}{{_i}}The alerts plugin works on regular alert messages, and block messages.{{/i}}
{{_i}}Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.{{/i}}
{{_i}}Enable dismissal of an alert via javascript:{{/i}}
$(".alert").alert()
{{_i}}Just add data-dismiss="alert"
to your close button to automatically give an alert close functionality.{{/i}}
<a class="close" data-dismiss="alert" href="#">×</a>
{{_i}}Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade
and .in
class already applied to them.{{/i}}
{{_i}}Closes an alert.{{/i}}
$(".alert").alert('close')
{{_i}}Bootstrap's alert class exposes a few events for hooking into alert functionality.{{/i}}
{{_i}}Event{{/i}} | {{_i}}Description{{/i}} |
---|---|
{{_i}}close{{/i}} | {{_i}}This event fires immediately when the close instance method is called.{{/i}} |
{{_i}}closed{{/i}} | {{_i}}This event is fired when the alert has been closed (will wait for css transitions to complete).{{/i}} |
$('#my-alert').bind('closed', function () { // {{_i}}do something…{{/i}} })
{{_i}}Get base styles and flexible support for collapsible components like accordions and navigation.{{/i}}
{{_i}}Download file{{/i}}* {{_i}}Requires the Transitions plugin to be included.{{/i}}
{{_i}}Using the collapse plugin, we built a simple accordion style widget:{{/i}}
{{_i}}Enable via javascript:{{/i}}
$(".collapse").collapse()
{{_i}}Name{{/i}} | {{_i}}type{{/i}} | {{_i}}default{{/i}} | {{_i}}description{{/i}} |
---|---|---|---|
{{_i}}parent{{/i}} | {{_i}}selector{{/i}} | false | {{_i}}If selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior){{/i}} |
{{_i}}toggle{{/i}} | {{_i}}boolean{{/i}} | true | {{_i}}Toggles the collapsible element on invocation{{/i}} |
{{_i}}Just add data-toggle="collapse"
and a data-target
to element to automatically assign control of a collapsible element. The data-target
attribute accepts a css selector to apply the collapse to. Be sure to add the class collapse
to the collapsible element. If you'd like it to default open, add the additional class in
.{{/i}}
<button class="btn btn-danger" data-toggle="collapse" data-target="#demo"> {{_i}}simple collapsible{{/i}} </button> <div id="demo" class="collapse in"> … </div>
data-parent="#selector"
. Refer to the demo to see this in action.{{/i}}
{{_i}}Activates your content as a collapsible element. Accepts an optional options object
.{{/i}}
$('#myCollapsible').collapse({ toggle: false })
{{_i}}Toggles a collapsible element to shown or hidden.{{/i}}
{{_i}}Shows a collapsible element.{{/i}}
{{_i}}Hides a collapsible element.{{/i}}
{{_i}}Bootstrap's collapse class exposes a few events for hooking into collapse functionality.{{/i}}
{{_i}}Event{{/i}} | {{_i}}Description{{/i}} |
---|---|
{{_i}}show{{/i}} | {{_i}}This event fires immediately when the show instance method is called.{{/i}} |
{{_i}}shown{{/i}} | {{_i}}This event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).{{/i}} |
{{_i}}hide{{/i}} |
{{_i}}This event is fired immediately when the hide method has been called.{{/i}}
|
{{_i}}hidden{{/i}} | {{_i}}This event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).{{/i}} |
$('#myCollapsible').on('hidden', function () { // {{_i}}do something…{{/i}} })
{{_i}}A generic plugin for cycling through elements. A merry-go-round.{{/i}}
{{_i}}Download file{{/i}}{{_i}}Watch the slideshow below.{{/i}}
{{_i}}Call via javascript:{{/i}}
$('.carousel').carousel()
{{_i}}Name{{/i}} | {{_i}}type{{/i}} | {{_i}}default{{/i}} | {{_i}}description{{/i}} |
---|---|---|---|
{{_i}}interval{{/i}} | {{_i}}number{{/i}} | 5000 | {{_i}}The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.{{/i}} |
{{_i}}pause{{/i}} | {{_i}}string{{/i}} | "hover" | {{_i}}Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.{{/i}} |
{{_i}}Data attributes are used for the previous and next conrols. Check out the example markup below.{{/i}}
<div id="myCarousel" class="carousel slide"> <!-- {{_i}}Carousel items{{/i}} --> <div class="carousel-inner"> <div class="active item">…</div> <div class="item">…</div> <div class="item">…</div> </div> <!-- {{_i}}Carousel nav{{/i}} --> <a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a> <a class="carousel-control right" href="#myCarousel" data-slide="next">›</a> </div>
{{_i}}Initializes the carousel with an optional options object
and starts cycling through items.{{/i}}
$('.carousel').carousel({ interval: 2000 })
{{_i}}Cycles through the carousel items from left to right.{{/i}}
{{_i}}Stops the carousel from cycling through items.{{/i}}
{{_i}}Cycles the carousel to a particular frame (0 based, similar to an array).{{/i}}
{{_i}}Cycles to the previous item.{{/i}}
{{_i}}Cycles to the next item.{{/i}}
{{_i}}Bootstrap's carousel class exposes two events for hooking into carousel functionality.{{/i}}
{{_i}}Event{{/i}} | {{_i}}Description{{/i}} |
---|---|
{{_i}}slide{{/i}} | {{_i}}This event fires immediately when the slide instance method is invoked.{{/i}} |
{{_i}}slid{{/i}} | {{_i}}This event is fired when the carousel has completed its slide transition.{{/i}} |
{{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}
{{_i}}Download file{{/i}}{{_i}}Start typing in the field below to show the typeahead results.{{/i}}
{{_i}}Call the typeahead via javascript:{{/i}}
$('.typeahead').typeahead()
{{_i}}Name{{/i}} | {{_i}}type{{/i}} | {{_i}}default{{/i}} | {{_i}}description{{/i}} |
---|---|---|---|
{{_i}}source{{/i}} | {{_i}}array{{/i}} | [ ] | {{_i}}The data source to query against.{{/i}} |
{{_i}}items{{/i}} | {{_i}}number{{/i}} | 8 | {{_i}}The max number of items to display in the dropdown.{{/i}} |
{{_i}}matcher{{/i}} | {{_i}}function{{/i}} | {{_i}}case insensitive{{/i}} | {{_i}}The method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query . Return a boolean true if query is a match.{{/i}} |
{{_i}}sorter{{/i}} | {{_i}}function{{/i}} | {{_i}}exact match, case sensitive, case insensitive{{/i}} |
{{_i}}Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query .{{/i}} |
{{_i}}highlighter{{/i}} | {{_i}}function{{/i}} | {{_i}}highlights all default matches{{/i}} | {{_i}}Method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.{{/i}} |
{{_i}}Add data attributes to register an element with typeahead functionality.{{/i}}
<input type="text" data-provide="typeahead">
{{_i}}Initializes an input with a typeahead.{{/i}}