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="https://ft.jushishang.cn/" class="btn" data-dismiss="modal">Close</a>
    <a href="https://O.jushishang.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="https://ycie.jushishang.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="https://ycie.jushishang.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.

信息安全保障强调依赖 实现组织的使命免费学校网站建设国家网络安全局巡视洛阳 网站建设网络安全服务考试网站设计网络营销的 书籍推荐太原网站制作什么是营销型的网站推广沈阳营销咨询公司古老神秘的神族极其罕见地出现一位叛逆者,他来到“人间”,要过“人”的生活。 我们的神族与人并肩战斗,与外来入侵者进行了一场旷世未有的大战。一名学生,经历商业洗礼 一个传奇,历练终成奇迹 到底如何,且看商业风云我是谁?我在废墟残垣中醒来,人类和机器人的战争让世界都濒临毁灭,谁来救救我们?谁来救救世界?谁来拯救这次末日之战?异世界重生 一穷二白, 苏醒后只有个关心自己的漂亮妹妹。玄灵界,这片拥有着十境九地的广袤大陆之上,每隔千年便会产生一次降灵异象,伴随异象应世之人被称为玄灵尊者,而每任玄灵尊者的使命,就是带领灵族众将,重新封印上古异族。父母神秘失踪后,王令回到老家,原本只想在村里躲避追债,却不料某天发现手机里竟然出现了一款和现实接轨的游戏。 他打倒恶霸,带领乡亲们致富,建立属于自己的世外桃源! 只是,有时候这系统派的任务,有点奇葩。 表白村花? 昨天刚放狗咬的人家啊!怎么办,在线等!本书可操作空间极大,你喜欢看什么类型的可以告诉我,后面随时可以安排上,或者你的经历等等都可以润色后成为章节已知宇宙诸多文明对地球虎视眈眈,华夏组织超级连队铁浮屠,为阻挡外星力量筑起保卫地球的血色长城主角李萧雨穿越到了修仙世界,开启了一番奇妙的旅程重生先天人族,本以为是人生巅峰,哪知道却要面临重重危机,在妖族的虎视眈眈下,陆丰凭借自己的努力,和系统给予的机会, 定人族三祖,册三皇封五帝,立人道圣人,对抗天庭和鸿钧,以及强大的天道—— 陆丰:“巫妖量劫来临之前,我要让整个洪荒,都在人族的铁拳下颤抖……”
2016中国信息安全服务年会 网络营销工具和方法有哪些内容 北京网站建设 中山精品网站建设方案成都网络安全公司排名 深圳网络营销师招聘信息 亚洲信息安全峰会 网络广告的营销作用 济南网站建设多少钱 苏州做网站 珠海营销型网站 灵魂化解的意义咨询【www.richdady.cn】 孩子不爱读书的阅读计划【www.richdady.cn】 灵魂种子治疗【www.richdady.cn】 无形干扰咨询【www.richdady.cn】 化解冤亲债主的有效方法【www.richdady.cn】 婴灵的超度与心理安慰咨询【σσЗ8З55О88О√转ihbwel 失业的自我提升咨询【Q⒊⒏⒊⒌⒌O⒏⒏O】√转ihbwel 纠纷的预防措施【Q⒊⒏⒊⒌⒌O⒏⒏O】√转ihbwel 孩子不爱读书的原因有哪些?咨询【www.richdady.cn】√转ihbwel 与公婆前世的前世修行咨询【Q⒊⒏⒊⒌⒌O⒏⒏O】√转ihbwel 心慌胸闷头晕的心理调适威:⒊⒏⒊⒌⒌O⒏⒏O√转ihbwel 提高孩子阅读兴趣的方法咨询【企鹅383550880】√转ihbwel 孩子厌学的原因分析咨询【企鹅383550880】√转ihbwel 婴灵的超度与心理安慰咨询【企鹅383550880】√转ihbwel 投资项目的前世因果咨询【Q⒊⒏⒊⒌⒌O⒏⒏O】√转ihbwel 投资项目的案例分享咨询威:⒊⒏⒊⒌⒌O⒏⒏O√转ihbwel 升迁障碍的职场瓶颈咨询【Q⒊⒏⒊⒌⒌O⒏⒏O】√转ihbwel 孩子不爱读书的阅读计划如何制定?咨询【σσЗ8З55О88О√转ihbwel 特殊学校的教学方法【企鹅383550880】√转ihbwel 失业的前世因果咨询【微:qq383550880 】√转ihbwel 电商短信营销 苏州做网站 中山精品网站建设方案成都网络安全公司排名 网络广告的营销作用 太原市做网站 房地产的网络营销方案 邮件营销电子邮件模板 自己造网站 岳阳网站制作 h5网站搭建 网营销策划方案电商 网络安全 flash 重庆好的网络营销公司 北京信息安全服务平台,-1 石狮做网站 网络营销的流程? 日常生活营销思维故事 中央信息安全委员会 沈阳营销咨询公司 军用信息安全产品认证证书等级 建立网站的方案 自建网站的缺点 重庆好的网络营销公司 网络安全对话 网络安全系统的管理 信息安全实训总结 郑州网站推广流程 信息安全保障强调依赖 实现组织的使命 高校信息安全实验室 山东 信息安全 检查 合肥做网站的价格 馆陶网站建设 营销广告语 营销推介 网站设计 自建网站的缺点 2016年信息安全 济南网站建设多少钱 营销市场细分的原则 2017重大信息安全事件 苏州专业做网站 宁晋做网站微信群如何做网络营销 网络营销工具和方法有哪些内容 网络营销的 书籍推荐 信息安全分析 什么是营销型的网站推广 做谷歌网站 2012年中国互联网网络安全研究报告 创建网站的优势 济南做网站公司 企业网站备案策划 免飞网站 信息安全保障强调依赖 实现组织的使命 创建网站的优势 网站兼容问题 互联网信息安全产品 网站建设的售后 成都网站开发公司排名 小米的营销手段有 营销策划天培营销 上上海银基信息安全技术有限公司 房地产的网络营销方案 网络安全对话 个人电脑网络安全 四川互联网营销策划 h5网站搭建 什么是营销型网站 常州网站设计 石狮做网站 厦门网站推广 网站设计步骤 市场细分与目标营销 吉林网站建设 太原市做网站 qq营销结果分析 织梦(dedecms)网站不同自定义表单提交后的跳转链接怎么修改?网络安全测试标准 个人电脑网络安全 可口可乐的软文营销案例 linux网络安全招聘 营销广告语 广州网站设计公司 计算机网络安全 实验 网络营销的商品按其形态可分为三大类即实体商品软体商品和在线服务 江苏网站设计公司 卫龙营销战略 广州网站设计公司 重庆网站开发设计公司 电子商务 网络营销培训 深圳网络营销师招聘信息 重庆网站开发设计公司 网络营销师证书 网站设计步骤 网络安全攻防大赛简讯 小米的营销手段有 银监会 网络安全 汽车营销案例 网站带后台 信息安全和软件开发 成都网站推广 网络安全 国际标准 贵阳建网站 新余建网站 自己造网站 郑州网站推广流程 营销策划天培营销 工业控制系统信息安全 责任 网络营销的发展 无锡知名网站制作 安卓网络安全协议 品牌营销网 网络安全rss源 北京交通大学网络与信息安全事件处理流程,-1 网站通栏 信息安全合规 苏州做网站 自制app网站 企业 开展信息安全业务,-1 网络广告的营销作用 长沙电子商务网站建设 什么是营销型网站 房地产的网络营销方案 传统营销模式的利弊 河南信息安全专业吗 自己造网站 网络安全评价标准主要有哪些网络安全热点问题 网络营销师证书 信息安全等级保护管理办法(试行),-1 太原网站制作 2016中国信息安全服务年会 营销推介 重庆网站建设 cio信息安全高峰论坛 网站设计的公司 法国网络安全战略 网站设计