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 use switch in bootstrap

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

Share

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

This article introduces the knowledge of "how to use switch in bootstrap". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

In bootstrap, switch is used to style the selection box similar to the switch and is the bootstrap plug-in that implements the check box beautification switch with the calling syntax of "$(selection box element). BootstrapSwitch ();".

Operating environment of this tutorial: Windows7 system, bootstrap3.3.7 version, DELL G3 computer

What is the use of switch in bootstrap

Bootstrap Switch is a switch control realized through check box beautification, which can set a switch-like style to the selection box. It is a plug-in that depends on Bootstrap.

download

Official website address: https://www.bootcdn.cn/bootstrap-switch/

GitHub download address: https://github.com/Bttstrp/bootstrap-switch

Import

Use

/ / define a selection box / / apply a style to the selection box $("[name='test']") .bootstrapSwitch ()

Attribute

Commonly used attributes:

Size: switch size. Available values include mini, small, normal, and large

OnColor: the color of the open button in the switch. Available values include primary, info, success, warning, danger, default

OffColor: the color of the off button in the switch. Optional values primary, info, success, warning, danger, default

OnText: the text of the open button in the switch. The default is ON.

OffText: the text of the off button in the switch. Default is OFF.

OnInit: the event that initializes the component.

OnSwitchChange: the event when the switch changes.

Data-on-color/ data-off-color: primary dark blue, info light blue, success green, warning yellow, danger red

Detailed introduction:

This is the end of the content of "how to use switch in bootstrap". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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