https://github.com/amyth/jquery-icheck
jQuery icheck is an interactive checkbox with a better UI and UX. jQuery-iCheck converts a checkbox into a switch/button where the on/off values are customizable.
https://github.com/amyth/jquery-icheck
Last synced: 26 days ago
JSON representation
jQuery icheck is an interactive checkbox with a better UI and UX. jQuery-iCheck converts a checkbox into a switch/button where the on/off values are customizable.
- Host: GitHub
- URL: https://github.com/amyth/jquery-icheck
- Owner: amyth
- License: mit
- Created: 2015-07-03T05:21:49.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-03T12:50:24.000Z (almost 11 years ago)
- Last Synced: 2023-04-01T06:05:09.149Z (about 3 years ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## jquery-icheck
jQuery icheck is an interactive checkbox with a better UI and UX. jQuery-iCheck converts a checkbox into a switch/button where the on/off values are customizable.
### Usage
---
First include jquery in the `` section of your HTML template/page.
```
```
Then include jQuery-iCheck's `js` and `css` file in the HTML
```
```
Finally to initialize icheck on a checkbox just use the `icheck` method.
```
$('#sample-checkbox').icheck();
```
### Options
---
As icheck is a lightweight and a very basic plugin there are only two options available at the moment that let's you change the text for the checkbox on `checked` and `unchecked` state respectively.
- checkedText: (string) This string will be used as the selected value when the checkbox is in a checked state
- uncheckedText: (string) This string will be used as the selected value when the checkbox is in an unchecked state
To override the defaults you'd need to pass in the custom options as an object while calling the icheck method. Following is an example.
```
$('#sample-checkbox').icheck({
uncheckedText: "No",
checkedText: "Yes"
});
```
### Contributors
---
Amyth Singh ()