Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to implement buttons and folding plug-ins in Bootstrap

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article will explain in detail how to implement buttons and folding plug-ins in Bootstrap. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

One. Buttons can create buttons in different states through the button plug-in. / / single switch. Single toggle Note: the button may keep the form disabled or selected when the Firefox page is loaded multiple times. The solution is to add autocomplete= "off". / / Radio button male and female / / check button Music Sports Art computer / / load status $('# myButton'). On ('click', function () {var btn = $(this) .button (' loading'); setTimeout (function () {btn.button ('reset');}, 1000);}); there are three parameters in the button method in the Button plug-in: toggle, reset, string (such as loading, complete). / can replace data-toggle= "button" $('button') .on (' click', function () {$(this) .button ('toggle');}) two. Fold content by clicking. / / basic instance BootstrapBootstrap is an open source toolkit for front-end development launched by Twitter. It is a CSS/HTML framework developed by Twitter designers Mark Otto and Jacob Thornton. Currently, the latest version of Bootstrap is 3.0. / / accordion folding Click me to show, and then click me to fold, the first part here is the first part. Click on me to show, and then click on me to fold, the second part here is the second part. Click on me to show, and then click on me to fold, the third part here is the third part.

/ / accordion effect $('# collapseOne, # collapseTwo, # collapseThree, # collapseFour'). Collapse ({parent:'# accordion',toggle: false,}); / / manually call $('button'). On (' click', function () {$('# collapseOne'). Collapse ({toggle: true,});}); / / the collapse method also provides three parameters: hide, show, toggle. $('# collapseOne'). Collapse ('hide'); $(' # collapseTwo'). Collapse ('show'); $(' button'). On ('click', function () {$(' # collapseOne'). Collapse ('toggle');}); there are four kinds of events in the Collapse plug-in.

$('# collapseOne'). On ('show.bs.collapse', function () {

Alert ('triggered when the show method is called')

});

This is the end of this article on "how to achieve buttons and folding plug-ins in Bootstrap". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report