重装革新 全新LAND CRUISER 200上市

权益屡受侵害 日本佐贺召开中国研修生制度研讨会

Plugins can be included individually (though some have required dependencies), or all at once. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file.

欧洲经济整体濒临衰退边缘

You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.

That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:

$('body').off('.data-api')

Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:

$('body').off('.alert.data-api')

巴克莱丑闻暴露英国银行监管漏洞

We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.

$(".btn.danger").button("toggle").addClass("fat")

All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):

$("#myModal").modal()                       // initialized with defaults
$("#myModal").modal({ keyboard: false })   // initialized with no keyboard
$("#myModal").modal('show')                // initializes and invokes show immediately

Each plugin also exposes its raw constructor on a `Constructor` property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').

北海道一烤肉店向中国游客提供冒牌“神户牛肉”

Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and its past participle form (ex. shown) is trigger on the completion of an action.

All infinitive events provide preventDefault functionality. This provides the abililty to stop the execution of an action before it starts.

$('#myModal').on('show', function (e) {
    if (!data) return e.preventDefault() // stops modal from being shown
})

郑州:电热毯销售市场良莠混杂 消费者勿唯价是求

For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.

净利息差贡献银行暴利 推动利率市场化等改革

A few examples of the transition plugin:

  • Sliding or fading in modals
  • Fading out tabs
  • Fading out alerts
  • Sliding carousel panes

国资委要求央企加强投资项目预算控制

Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.

英银行家丢了骑士封号 决策失误致银行濒临破产

A rendered modal with header, body, and set of actions in the footer.

<div class="modal hide fade">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h3>Modal header</h3>
  </div>
  <div class="modal-body">
    <p>One fine body…</p>
  </div>
  <div class="modal-footer">
    <a href="#" class="btn">Close</a>
    <a href="#" class="btn btn-primary">Save changes</a>
  </div>
</div>

海南部分珠宝店"免费"送玉石 游客被忽悠一万多

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

<!-- Button to trigger modal -->
<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>

<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Modal header</h3>
  </div>
  <div class="modal-body">
    <p>One fine body…</p>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    <button class="btn btn-primary">Save changes</button>
  </div>
</div>

陈德铭:指责他国不守贸易规则国家应先自律

中国将加大宽带领域国家引导性投入

Activate a modal without writing JavaScript. Set data-toggle="modal" on a controller element, like a button, along with a data-target="#foo" or href="#foo" to target a specific modal to toggle.

<button type="button" data-toggle="modal" data-target="#myModal">Launch modal</button>

27位股民起诉五粮液索赔304万 律师称事实确凿

Call a modal with id myModal with a single line of JavaScript:

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

河北部分银行回归基准利率 警惕不实口头承诺

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-backdrop="".

Nametypedefaultdescription
backdropbooleantrueIncludes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click.
keyboardbooleantrueCloses the modal when escape key is pressed
showbooleantrueShows the modal when initialized.
remotepathfalse

If a remote url is provided, content will be loaded via jQuery's load method and injected into the .modal-body. If you're using the data api, you may alternatively use the href tag to specify the remote source. An example of this is shown below:

<a data-toggle="modal" href="remote.html" data-target="#modal">click me</a>

美国女子iPhone4充电爆炸 苹果未做出官方回应

2012老百姓看好绿色GDP 最盼菜篮子越拎越轻

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

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

环保成本倒逼稀土行业向深加工转型

Manually toggles a modal.

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

杜绝“毒胶囊” 健康用药指导类APP推荐

Manually opens a modal.

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

八成学生暑期投身社会实践 实习如何提高含金量

Manually hides a modal.

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

就不锈钢水槽发起“双反” 美对华再掀贸易战

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

EventDescription
showThis event fires immediately when the show instance method is called.
shownThis event is fired when the modal has been made visible to the user (will wait for css transitions to complete).
hideThis event is fired immediately when the hide instance method has been called.
hiddenThis 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…
})

银行只租不管 引发诸多法律问题

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.

车险够赔吗?——代表委员剖析“撞豪车”

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.

首届京交会落幕 签约总额超600亿美元

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.


江西多市降雪 多部门联动确保春节运输通畅

IPO后第一轮钱传网秦投七千万砸市场

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) and data-target=".navbar" to select which nav to use. You'll want to use scrollspy with a .nav component.

<body data-spy="scroll" data-target=".navbar">...</body>

13日芝加哥农产品期价集体上扬

Call the scrollspy via JavaScript:

$('#navbar').scrollspy()
Heads up! Navbar links must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the dom like <div id="home"></div>.

未张贴食品安全等级公示牌的餐饮单位将被曝光

民间投资"新36条"细则月内出台 重点"放宽准入"

When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:

$('[data-spy="scroll"]').each(function () {
  var $spy = $(this).scrollspy('refresh')
});

国产起亚K3年底上市 定位比福瑞迪要高

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset="".

Nametypedefaultdescription
offsetnumber10Pixels to offset from top when calculating position of scroll.

中国矿企“走出去” 签订4亿美元矿业合作协议

EventDescription
activateThis event fires whenever a new item becomes activated by the scrollspy.

三季度CPI增速或见底回升 下半年仍可能降息

Add quick, dynamic tab functionality to transiton through panes of local content, 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.


工商部门查扣今麦郎211箱超标产品

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)

摩托移动专利或被Android阵营企业“均分”

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>

王老吉:“亲娘”不及“奶娘”亲?

《乘用车内空气质量评价指南》3月1日起实施

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>

欧美恐步入通胀消债时代 专家吁中国小心“陷阱”

EventDescription
showThis 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.
shownThis 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
})

原国企老总贪污2629万获死缓

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.

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.

王老吉成广药最大“利润奶牛” 红绿之争再升级


高性价比DC导购 看哪几款最值得购买!

Trigger the tooltip via JavaScript:

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

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

Nametypedefaultdescription
animationbooleantrueapply a css fade transition to the tooltip
htmlbooleanfalseInsert html into the tooltip. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.
placementstring|function'top'how to position the tooltip - top | bottom | left | right
selectorstringfalseIf a selector is provided, tooltip objects will be delegated to the specified targets.
titlestring | function''default title value if `title` tag isn't present
triggerstring'hover'how tooltip is triggered - click | hover | focus | manual
delaynumber | object0

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.

离职潮带热猎头公司业务 地产等行业流动性最大

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="#" rel="tooltip" title="first tooltip">hover over me</a>

利息大战中应冷静行事 频繁转存不如囤"货"居奇

北京地区火车票售票系统瘫痪 南站手写车票

Attaches a tooltip handler to an element collection.

西安手机市场水货行货选购明辨

Reveals an element's tooltip.

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

人民币离硬通货还有多远?

Hides an element's tooltip.

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

安徽富煌钢构涉嫌侵吞巨额集体资产

Toggles an element's tooltip.

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

穆迪:三大趋势可能下拉全球银行评级

Hides and destroys an element's tooltip.

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

涉绑架谋杀女华商两菲律宾警察自首 否认参与犯罪

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. Requires Tooltip to be included.

延长产假别让女工权益“流产”

Four options are available: top, right, bottom, and left aligned.

什么造就汇丰的傲慢 冷对理财产品亏损保险拒赔

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

归真堂有胆上市没“胆”转型

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

深圳上调企业退休人员基本养老金

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

保险投资创新潮掀起 金融机构有望共分羹

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

No markup shown as popovers are generated from JavaScript and content within a data attribute.

北京车展发布 菲亚特C-Medium多图曝光

信托业亟待回归财富管理 制度构建仍然有缺陷


“欧元之父”蒙代尔:全球经济需要一个全球货币

Enable popovers via JavaScript:

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

TCL李东生:产业洗牌给中国企业超越的机会

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

Nametypedefaultdescription
animationbooleantrueapply a css fade transition to the tooltip
htmlbooleanfalseInsert html into the popover. If false, jquery's text method will be used to insert content into the dom. Use text if you're worried about XSS attacks.
placementstring|function'right'how to position the popover - top | bottom | left | right
selectorstringfalseif a selector is provided, tooltip objects will be delegated to the specified targets
triggerstring'click'how popover is triggered - click | hover | focus | manual
titlestring | function''default title value if `title` attribute isn't present
contentstring | function''default content value if `data-content` attribute isn't present
delaynumber | object0

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.

我国对欧美日进口相纸产品征收反倾销税

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

跨境人民币交易再加速 人民币可在193国交易

四川或一人独中大乐透1750万

Initializes popovers for an element collection.

印度三年来首次降息 中国是否跟风“降息潮”?

Reveals an elements popover.

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

欧元区4月份工业生产者价格指数环比保持稳定

Hides an elements popover.

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

如何摆脱头发亚健康?

Toggles an elements popover.

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

罗马尼亚遭遇暴风雪 使馆提醒中国公民注意安全

Hides and destroys an element's popover.

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

财税改革应在缩小收入差距中唱主角

Add dismiss functionality to all alert messages with this plugin.

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

台湾“佛光大佛”世界之最:最短工期 最高坐佛

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


樊纲:中国经济或将软着陆 货币政策仍不会放松

Enable dismissal of an alert via JavaScript:

$(".alert").alert()

大马政府机构在中文媒体登广告 冀华社了解政策

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

<a class="close" data-dismiss="alert" href="#">&times;</a>

小包装食用油能否破局? 中储粮加速布局

600元以下2G手机将面世 低端智能机迎来第二春

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.

政策暖风频吹 产业资本增持更待真金白银

Closes an alert.

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

拉加德:意大利需使政策更清晰

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

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

苹果iPad省城下架缘起侵权风波 工商已介入调查

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

在西班牙未成年孩子如何办居留

Add data-loading-text="Loading..." to use a loading state on a button.

<button type="button" class="btn btn-primary" data-loading-text="Loading...">Loading state</button>

理财师为小企业支招:积累信用可使贷款申请顺利

Add data-toggle="button" to activate toggling on a single button.

<button type="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 type="button" class="btn">Left</button>
  <button type="button" class="btn">Middle</button>
  <button type="button" class="btn">Right</button>
</div>

10万存款如何理财 理财师:固定期限银行理财品

Add data-toggle="buttons-radio" for radio style toggling on btn-group.

<div class="btn-group" data-toggle="buttons-radio">
  <button type="button" class="btn">Left</button>
  <button type="button" class="btn">Middle</button>
  <button type="button" class="btn">Right</button>
</div>

种族歧视暗流犹存? 美华人关注华裔士兵自杀事件

Enable buttons via JavaScript:

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

广东打击食品安全犯罪 失信企业法人进"黑名单"

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

珠三角金改力度超温州

None

高价有机菜存认知误区 成本仅比普通菜高二三成

珠海彩民刮出“好运十倍”40万头奖

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 type="button" class="btn" data-toggle="button" >…</button>

加长M领衔 英菲尼迪北京车展推两款新车

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 type="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".

工信部发电商十二五规划 交易额将破18万亿

Resets button state - swaps text to original text.

工信部:积极应对稀土争端 同步管理合乎WTO规则

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

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

广州番禺区一货车撞奔驰赔付50多万元

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

* Requires the Transitions plugin to be included.

有机食品换新标 部分超市难觅踪影

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.
<div class="accordion" id="accordion2">
  <div class="accordion-group">
    <div class="accordion-heading">
      <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
        Collapsible Group Item #1
      </a>
    </div>
    <div id="collapseOne" class="accordion-body collapse in">
      <div class="accordion-inner">
        Anim pariatur cliche...
      </div>
    </div>
  </div>
  <div class="accordion-group">
    <div class="accordion-heading">
      <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
        Collapsible Group Item #2
      </a>
    </div>
    <div id="collapseTwo" class="accordion-body collapse">
      <div class="accordion-inner">
        Anim pariatur cliche...
      </div>
    </div>
  </div>
</div>
...

You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.

<button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo">
  simple collapsible
</button>

<div id="demo" class="collapse in"> … </div>

人民币汇率弹性再扩大 出口企业面临汇率风险挑战

入世十年聚焦:一座纺织名城的WTO历程

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.

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.

纪宁:创业的人都是和自己过不去

Enable manually with:

$(".collapse").collapse()

诺基亚被迫关闭欧洲最后一座大型手机工厂

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-parent="".

Nametypedefaultdescription
parentselectorfalseIf selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior)
togglebooleantrueToggles the collapsible element on invocation

时尚品牌加快布局中国市场 质量问题初显

上海浦东推动迪士尼、前滩、临港地区开发提速

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

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

台湾地区修法防艾滋器官误植 须完整病历才能手术

Toggles a collapsible element to shown or hidden.

应对"大数据"挑战 IBM发布"智慧存储"战略

Shows a collapsible element.

在意大利如何申请社会津贴?

Hides a collapsible element.

政策累积效果正在释放 “硬着陆”风险不大

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

EventDescription
showThis event fires immediately when the show instance method is called.
shownThis 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.
hiddenThis 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…
})

速冻食品常遇“细菌门” 并非越“冻”越新鲜

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

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

继续实施积极财政政策 中国政府减税增支

“三包”升级存争议 行业集中度待提升

Add data attributes to register an element with typeahead functionality as shown in the example above.

谷歌收购摩托罗拉移动有望上半年完成

Call the typeahead manually with:

$('.typeahead').typeahead()

12日黄金期货疲弱盘整 现货金银近全线收跌

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-source="".

Nametypedefaultdescription
sourcearray, function[ ]The data source to query against. May be an array of strings or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.
itemsnumber8The max number of items to display in the dropdown.
minLengthnumber1The minimum character length needed before triggering autocomplete suggestions
matcherfunctioncase insensitiveThe 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.
sorterfunctionexact 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.
updaterfunctionreturns selected itemThe method used to return selected item. Accepts a single argument, the item and has the scope of the typeahead instance.
highlighterfunctionhighlights all default matchesMethod used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.

存款变保险 信诚人寿忽悠人无法退还所有本金

希腊或放弃公投 美股涨幅超1%

Initializes an input with a typeahead.

68亿美元!UPS收购TNT快递

The subnavigation on the left is a live demo of the affix plugin.


我国去年财政收支均突破10万亿元

聚焦粮食安全四大隐忧 如何实现粮食"九连增"?

To easily add affix behavior to any element, just add data-spy="affix" to the element you want to spy on. Then use offsets to define when to toggle the pinning of an element on and off.

<div data-spy="affix" data-offset-top="200">...</div>
Heads up! You must manage the position of a pinned element and the behavior of its immediate parent. Position is controlled by affix, affix-top, and affix-bottom. Remember to check for a potentially collapsed parent when the affix kicks in as it's removing content from the normal flow of the page.

铁矿石价格受制于人 钢铁业上市公司深陷寒冬

Call the affix plugin via JavaScript:

$('#navbar').affix()

外资仍然青睐中国

汽车安全带插扣是个害人的东西

When using affix in conjunction with adding or removing of elements from the DOM, you'll want to call the refresh method:

$('[data-spy="affix"]').each(function () {
  $(this).affix('refresh')
});

银行利用息差发横财 经济下行年终奖鲜见下降

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset-top="200".

Nametypedefaultdescription
offsetnumber | function | object10Pixels to offset from screen when calculating position of scroll. If a single number is provide, the offset will be applied in both top and left directions. To listen for a single direction, or multiple unique offsets, just provided an object offset: { x: 10 }. Use a function when you need to dynamically provide an offset (useful for some responsive designs).