About modals

A streamlined, but flexible, take on the traditional javascript modal plugin with only the minimum required functionality and smart defaults.

Download file

Static example

Below is a statically rendered modal.

Live demo

Toggle a modal via javascript by clicking the button below. It will slide down and fade in from the top of the page.

Launch demo modal

Using bootstrap-modal

Call the modal via javascript:

$('#myModal').modal(options)

Options

Name type default description
backdrop boolean true Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click.
keyboard boolean true Closes the modal when escape key is pressed
show boolean true Shows the modal when initialized.

Markup

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.

<a class="btn" data-toggle="modal" href="#myModal" >Launch Modal</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>One fine body…</p>
  </div>
  <div class="modal-footer">
    <a href="http://mOa.pdupdcd.cn/" class="btn" data-dismiss="modal">Close</a>
    <a href="http://a.pdupdcd.cn/" class="btn btn-primary">Save changes</a>
  </div>
</div>
Heads up! If you want your modal to animate in and out, just add a .fade class to the .modal element (refer to the demo to see this in action) and include bootstrap-transition.js.

Methods

.modal(options)

Activates your content as a modal. Accepts an optional options object.

$('#myModal').modal({
  keyboard: false
})

.modal('toggle')

Manually toggles a modal.

$('#myModal').modal('toggle')

.modal('show')

Manually opens a modal.

$('#myModal').modal('show')

.modal('hide')

Manually hides a modal.

$('#myModal').modal('hide')

Events

Bootstrap's modal class exposes a few events for hooking into modal functionality.

Event Description
show This event fires immediately when the show instance method is called.
shown This event is fired when the modal has been made visible to the user (will wait for css transitions to complete).
hide This event is fired immediately when the hide instance method has been called.
hidden This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).
$('#myModal').on('hidden', function () {
  // do something…
})


This plugin adds quick, dynamic tab and pill functionality for transitioning through local content.

Download file

Example tabs

Click the tabs below to toggle between hidden panes, even via dropdown menus.

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.


Using bootstrap-tab.js

Enable tabbable tabs via javascript (each tab needs to be activated individually):

$('#myTab a').click(function (e) {
  e.preventDefault();
  $(this).tab('show');
})

You can activate individual tabs in several ways:

$('#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)

Markup

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.

<ul class="nav nav-tabs">
  <li><a href="#home" data-toggle="tab">Home</a></li>
  <li><a href="#profile" data-toggle="tab">Profile</a></li>
  <li><a href="#messages" data-toggle="tab">Messages</a></li>
  <li><a href="#settings" data-toggle="tab">Settings</a></li>
</ul>

Methods

$().tab

Activates a tab element and content container. Tab should have either a data-target or an href targeting a container node in the DOM.

<ul class="nav nav-tabs" id="myTab">
  <li class="active"><a href="#home">Home</a></li>
  <li><a href="#profile">Profile</a></li>
  <li><a href="#messages">Messages</a></li>
  <li><a href="#settings">Settings</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>

Events

Event Description
show 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.
shown 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.
$('a[data-toggle="tab"]').on('shown', function (e) {
  e.target // activated tab
  e.relatedTarget // previous tab
})

About Tooltips

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.

Download file

Example use of Tooltips

Hover over the links below to see tooltips:

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.


Using bootstrap-tooltip.js

Trigger the tooltip via javascript:

$('#example').tooltip(options)

Options

Name type default description
animation boolean true apply a css fade transition to the tooltip
placement string|function 'top' how to position the tooltip - top | bottom | left | right
selector string false If a selector is provided, tooltip objects will be delegated to the specified targets.
title string | function '' default title value if `title` tag isn't present
trigger string 'hover' how tooltip is triggered - hover | focus | manual
delay number | object 0

delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

If a number is supplied, delay is applied to both hide/show

Object structure is: delay: { show: 500, hide: 100 }

Heads up! Options for individual tooltips can alternatively be specified through the use of data attributes.

Markup

For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.

<a href="http://cerfl.www.bh9hp.9bv46.www.i26b7.pvlg.pdupdcd.cn/" rel="tooltip" title="first tooltip">hover over me</a>

Methods

$().tooltip(options)

Attaches a tooltip handler to an element collection.

.tooltip('show')

Reveals an element's tooltip.

$('#element').tooltip('show')

.tooltip('hide')

Hides an element's tooltip.

$('#element').tooltip('hide')

.tooltip('toggle')

Toggles an element's tooltip.

$('#element').tooltip('toggle')

About popovers

Add small overlays of content, like those on the iPad, to any element for housing secondary information.

* Requires Tooltip to be included

Download file

Example hover popover

Hover over the button to trigger the popover.


Using bootstrap-popover.js

Enable popovers via javascript:

$('#example').popover(options)

Options

Name type default description
animation boolean true apply a css fade transition to the tooltip
placement string|function 'right' how to position the popover - top | bottom | left | right
selector string false if a selector is provided, tooltip objects will be delegated to the specified targets
trigger string 'hover' how tooltip is triggered - hover | focus | manual
title string | function '' default title value if `title` attribute isn't present
content string | function '' default content value if `data-content` attribute isn't present
delay number | object 0

delay showing and hiding the popover (ms) - does not apply to manual trigger type

If a number is supplied, delay is applied to both hide/show

Object structure is: delay: { show: 500, hide: 100 }

Heads up! Options for individual popovers can alternatively be specified through the use of data attributes.

Markup

For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.

Methods

$().popover(options)

Initializes popovers for an element collection.

.popover('show')

Reveals an elements popover.

$('#element').popover('show')

.popover('hide')

Hides an elements popover.

$('#element').popover('hide')

.popover('toggle')

Toggles an elements popover.

$('#element').popover('toggle')

About alerts

The alert plugin is a tiny class for adding close functionality to alerts.

Download

Example alerts

The alerts plugin works on regular alert messages, and block messages.

Holy guacamole! Best check yo self, you're not looking too good.

Oh snap! You got an error!

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.

Take this action Or do this


Using bootstrap-alert.js

Enable dismissal of an alert via javascript:

$(".alert").alert()

Markup

Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.

<a class="close" data-dismiss="alert" href="http://cerfl.www.bh9hp.9bv46.www.i26b7.pvlg.pdupdcd.cn/">&times;</a>

Methods

$().alert()

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.

.alert('close')

Closes an alert.

$(".alert").alert('close')

Events

Bootstrap's alert class exposes a few events for hooking into alert functionality.

Event Description
close This event fires immediately when the close instance method is called.
closed This event is fired when the alert has been closed (will wait for css transitions to complete).
$('#my-alert').bind('closed', function () {
  // do something…
})

About

Do more with buttons. Control button states or create groups of buttons for more components like toolbars.

Download file

Example uses

Use the buttons plugin for states and toggles.

Stateful
Single toggle
Checkbox
Radio

Using bootstrap-button.js

Enable buttons via javascript:

$('.nav-tabs').button()

Markup

Data attributes are integral to the button plugin. Check out the example code below for the various markup types.

<!-- Add data-toggle="button" to activate toggling on a single button -->
<button class="btn" data-toggle="button">Single Toggle</button>
<!-- Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group -->
<div class="btn-group" data-toggle="buttons-checkbox">
  <button class="btn">Left</button>
  <button class="btn">Middle</button>
  <button class="btn">Right</button>
</div>
<!-- Add data-toggle="buttons-radio" for radio style toggling on btn-group -->
<div class="btn-group" data-toggle="buttons-radio">
  <button class="btn">Left</button>
  <button class="btn">Middle</button>
  <button class="btn">Right</button>
</div>

Methods

$().button('toggle')

Toggles push state. Gives the button the appearance that it has been activated.

Heads up! You can enable auto toggling of a button by using the data-toggle attribute.
<button class="btn" data-toggle="button" >…</button>

$().button('loading')

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 data-loading-text.

<button class="btn" data-loading-text="loading stuff..." >...</button>
Heads up! Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off".

$().button('reset')

Resets button state - swaps text to original text.

$().button(string)

Resets button state - swaps text to any data defined text state.

<button class="btn" data-complete-text="finished!" >...</button>
<script>
  $('.btn').button('complete')
</script>

About

Get base styles and flexible support for collapsible components like accordions and navigation.

Download file

* Requires the Transitions plugin to be included.

Example accordion

Using the collapse plugin, we built a simple accordion style widget:

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.
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.
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.

Using bootstrap-collapse.js

Enable via javascript:

$(".collapse").collapse()

Options

Name type default description
parent selector false If selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior)
toggle boolean true Toggles the collapsible element on invocation

Markup

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.

<button class="btn btn-danger" data-toggle="collapse" data-target="#demo">
  simple collapsible
</button>
<div id="demo" class="collapse in"> … </div>
Heads up! To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action.

Methods

.collapse(options)

Activates your content as a collapsible element. Accepts an optional options object.

$('#myCollapsible').collapse({
  toggle: false
})

.collapse('toggle')

Toggles a collapsible element to shown or hidden.

.collapse('show')

Shows a collapsible element.

.collapse('hide')

Hides a collapsible element.

Events

Bootstrap's collapse class exposes a few events for hooking into collapse functionality.

Event Description
show This event fires immediately when the show instance method is called.
shown This event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).
hide This event is fired immediately when the hide method has been called.
hidden This event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).
$('#myCollapsible').on('hidden', function () {
  // do something…
})


About

A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.

Download file

Example

Start typing in the field below to show the typeahead results.


Using bootstrap-typeahead.js

Call the typeahead via javascript:

$('.typeahead').typeahead()

Options

Name type default description
source array [ ] The data source to query against.
items number 8 The max number of items to display in the dropdown.
matcher function case insensitive 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.
sorter function exact match,
case sensitive,
case insensitive
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.
highlighter function highlights all default matches Method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.

Markup

Add data attributes to register an element with typeahead functionality.

<input type="text" data-provide="typeahead">

Methods

.typeahead(options)

Initializes an input with a typeahead.

杭州东新路7月23号天气兴安盟9月份天气预报临安新昌天气预报15天查询天目山未来7天天气天目山未来十天天气预报杭州东新路7月23号天气锡林郭勒天气风力临安新昌天气预报15天查询石屏县未来一段时间天气河南兰考天气预报穿什么衣服惠州天气停课铃临安新昌天气预报15天查询乌兰浩特10月天气惠州天气停课铃临安新昌天气预报15天查询2017年兰考十月天气【常熟天气2016.12.16天气天目山未来十天天气预报广州到南京天气预报 百度石屏一周天气预报2016.12.16天气石屏县未来一段时间天气长兴7月31日天气预报阜阳天气预抵报中国天气兴安盟阜阳天气预抵报长兴7月31日天气情况广州到南京天气预报 百度2016七月份云南天气于斗罗,李玄清是改变大陆的缔造者,是铸就帝王的帝师。 于封神,李玄清是只手对抗圣人,改变人族大势的圣师。 当来自诸天的体系互相碰撞,当来自诸天的人杰于万界绽放光辉,时代将具有何种变化,又将绽放出何种光辉。修仙难,一看天赋,二看机缘,三看身家。 王耀穿越而来,却成为一介天赋全无的边远村民。 且看王耀如何以妖入道,踏上仙徒,巧妙周旋,化险为夷。 凭借一腔热血,二世为人,成就三界功绩,四世威名!29岁的天岚,事业无成,刚刚朋友也和自己分手,独自一人走在熟悉的街道上,往事历历在目,也许终究是自己错了,但你们却也不该这样对我······ 如果能够回到过去,我想我一定······小镇上突然爆发了危机,镇民集体变成了见人就攻击的人,但唯独优依和她的小伙伴却没事,其中一人似乎对小镇上的事毫不知情,依然过着每天上学放学的日子。那是神吗? 没有人知道...... 面对着未知,有的人迈出了脚步,有的人停滞不前。 在新世界了,人们会改变吗? 有人相信,会的。 会有人去行动,去证明。 主人公为赚取零花钱而送外卖,不想接到了一个意外的订单,竟然要送去冥府。之后,他经历了一系列奇幻的事情。我也不知道我死了多少年了,组长说我是孟婆汤喝多了。 我在人间当鬼差,专门负责按照生死薄的时间和死法去收割人头。 阴间的KPI太重了,我想再死一死我叫白凌云,当我睁开眼时,我发现我竟然穿越了。 这里有武者,有魔法,有修仙,有忍术,有异能…… 在这里,武者是最卑微的存在,武已经没落了…… 而我,刚穿越就面临一个很严重的问题…… 谁能给我一碗馄饨面呀!我都快饿死了!穿越提瓦特,成为布局者社会底层的陈斌因生活奔波,母亲重病,心力交瘁,在寂静的夜晚倒在路边 至此 地球少了一个少年,穆真大陆多了一个传奇 一个人的毁灭铸就了另一个人的新生 ‘我萧易水偏偏不认命’
孽 场 中天稗史 江湖深似海 伞侠 灵界之下界 修仙:只想当咸鱼的我竟然成圣了! 雅加娜之花 青醒天下 日照银河 三国最强小才子 参生 太岁:不良少年到待业青年 小赢还在吗 万灵寻道 空灵髓 大威皇子 因果律法 群雄之大齐帝国 人生何处不春天 复仇男神 中国天气兴安盟 2017年兰考十月天气 山东荣成历史天气 天目山未来十天天气预报 兴安盟9月份天气预报 长兴7月31日天气情况 山东荣成历史天气 天气风云全国各地 3月25日东天目山天气 乌兰浩特10月天气 南京广州天气预报15天 南京广州天气预报15天 长兴7月31日天气预报 2017年兰考十月天气 杭州东新路7月23号天气 阜阳天气预抵报 昆明2017年六月天气 中国天气兴安盟 乌兰浩特5月天气 临安新昌天气预报15天查询 2017年兰考十月天气 临安新昌天气预报15天查询 乌兰浩特5月天气 2016.12.16天气 河南兰考天气预报穿什么衣服 东天目天气预报 中国天气兴安盟 乌兰浩特5月天气 乌兰浩特5月天气 3月25日东天目山天气 天目山未来十天天气预报 7月1号天气 天目山未来7天天气 杭州东新路7月23号天气 长兴7月31日天气预报 阜阳天气预抵报 天目山未来7天天气 山东荣成历史天气 长兴7月31日天气预报 南京10.31天气预报 阜阳天气预抵报 天气风云全国各地 广州到南京天气预报 百度 昆明2017年六月天气 惠州天气停课铃 7月1号天气 南京广州天气预报15天 阜阳天气预抵报 东天目天气预报 【常熟天气 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 风影之主 大周年代 野河之重生1994 飓风星神 灵台神矢:我的兔女郎 快连下载 亚星管理平台 亚星游戏官网 快连下载 百家乐官网 长兴7月31日天气预报 阜阳天气预抵报 广州到南京天气预报 百度 长兴7月31日天气情况 7月1号天气 长兴7月31日天气预报 广州这个天气预报15天查询 惠州天气停课铃 杭州东新路7月23号天气 石屏县未来一段时间天气 南京10.31天气预报 石屏县未来一段时间天气 2016七月份云南天气 石屏一周天气预报 阜阳天气预抵报 中国天气兴安盟 天目山未来十天天气预报 2016七月份云南天气 惠州天气停课铃 天目山未来十天天气预报 南京广州天气预报15天 2016.12.16天气 2017年兰考十月天气 昆明2017年六月天气 河南兰考天气预报穿什么衣服 广州这个天气预报15天查询 乌兰浩特10月天气 广州这个天气预报15天查询 3月25日东天目山天气 杭州东新路7月23号天气