Skip to content

Commit a3a2bea

Browse files
committed
Fix for Issue #3
1 parent 893a880 commit a3a2bea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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 |
9797
Methods 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

103103
Method |Example |Description
@@ -118,7 +118,7 @@ Note All events are propagated to and from input element to the switch button.
118118
You 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
133133
This 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

Comments
 (0)