Bootstrap Switch Switch Component Usage Method Detailed

Bootstrap Chinese Online has such a bootstrap-switch component, very practical, see Demo learning and record it.

bootstrap switch开关组件使用方法详解

              $ ('[Name = "status"]'). BootstrapSwitch ({ OnText: "Start", OffText: "Stop", ONCOLOR: "Success", Offcolor: "Info", Size: "Small", OnswitchChange: Function (Event, State) {if (state == true) {Alert (' Open ');} else {Alert (' Closed ');}}})        Bootstrap-Switch Source Address: Https:// documentation and demo: Common properties   
Size: Switch size. Optional values ​​have ‘mini’, ‘small’, ‘Normal’, ‘large’ oncolor: The color of the switch in the switch. Optional values ​​have ‘primary’, ‘info’, ‘sucss’, ‘warning’, ‘danger’, ‘default’
OFFCOLOR: The color of the switch neutral button. Optional value ‘primary’, ‘INFO’, ‘Success’, ‘Warning’, ‘Danger’, ‘Default’

onText: The text of the button in the switch is “on” by default.

OFFTEXT: The text of the switching button, the default is “OFF”.

OnNit: Initializing the event of the component.

OnSwitchChange: Events when the switch changes.

The above is all the contents of this article, I hope to help everyone’s learning, I hope that everyone will support TUMI clouds.

© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment