@@ -44,10 +44,10 @@ yarn add bootstrap-switch-button
4444# Usage
4545
4646## Initialize With HTML
47- Simply add ` data-toggle="switchButton " ` to automatically convert a plain checkbox into a bootstrap 4 switch button.
47+ Simply add ` data-toggle="switchbutton " ` to automatically convert a plain checkbox into a bootstrap 4 switch button.
4848
4949``` html
50- <input id =" chkSwitch" type =" checkbox" data-toggle =" switchButton " >
50+ <input id =" chkSwitch" type =" checkbox" data-toggle =" switchbutton " >
5151```
5252
5353## Initialize With Code
@@ -58,7 +58,7 @@ EX: Initialize id `chkSwitch` with a single line of JavaScript.
5858<input id =" chkSwitch" type =" checkbox" checked >
5959<script >
6060 $ (function (){
61- $ (' #chkSwitch' ).switchButton ();
61+ $ (' #chkSwitch' ).switchbutton ();
6262 });
6363 </script >
6464```
@@ -70,7 +70,7 @@ EX: Initialize id `chkSwitch` with a single line of JavaScript.
7070* For data attributes, append the option name to ` data- ` (ex: ` data-on="Enabled" ` )
7171
7272``` html
73- <input type =" checkbox" data-toggle =" switchButton " data-on =" Enabled" data-off =" Disabled" >
73+ <input type =" checkbox" data-toggle =" switchbutton " data-on =" Enabled" data-off =" Disabled" >
7474<input type =" checkbox" id =" switch-two" >
7575<script >
7676 $ (function () {
@@ -97,7 +97,7 @@ Name |Type |Default |Description |
9797Methods can be used to control switch buttons directly.
9898
9999``` html
100- <input id =" switch-demo" type =" checkbox" data-toggle =" switchButton " >
100+ <input id =" switch-demo" type =" checkbox" data-toggle =" switchbutton " >
101101```
102102
103103Method |Example |Description
@@ -118,7 +118,7 @@ Note All events are propagated to and from input element to the switch button.
118118You should listen to events from the ` <input type="checkbox"> ` directly rather than look for custom events.
119119
120120``` html
121- <input id =" switch-event" type =" checkbox" data-toggle =" switchButton " >
121+ <input id =" switch-event" type =" checkbox" data-toggle =" switchbutton " >
122122<div id =" console-event" ></div >
123123<script >
124124 $ (function () {
@@ -133,7 +133,7 @@ You should listen to events from the `<input type="checkbox">` directly rather t
133133This also means that using the API or Input to trigger events will work both ways.
134134
135135``` html
136- <input id =" switch-trigger" type =" checkbox" data-toggle =" switchButton " >
136+ <input id =" switch-trigger" type =" checkbox" data-toggle =" switchbutton " >
137137<button class =" btn btn-success" onclick =" toggleApiOn()" >On by API</button >
138138<button class =" btn btn-danger" onclick =" toggleApiOff()" >Off by API</button >
139139<button class =" btn btn-success" onclick =" toggleInpOn()" >On by Input</button >
0 commit comments