Simple button checks
Simple button checks is a simple plugin for transform checkbox inputs into html buttons for css customize. High performance, keyboard support and preserve original input click/change events.
Getting started
1. Include Simple button checks files to website/app
After that we need to include CSS and JS files to our website/app. In your html file:
2. Add html inputs
This plugin contemplates several label-input formats:
3. Initialize plugin
After load jquery and simple-button-checks js files
Options
Parameter | Type | Default | Description |
---|---|---|---|
buttonClass |
string |
'sbr-default' |
Class attribute value for new html button tag |
checkedIcon |
string |
'<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/></svg>' |
button inner html when input is checked |
nonCheckedIcon |
string |
'' |
button inner html when input is not checked |
wrapContainer |
string |
'none' |
Values: 'none' or 'input' or 'all'. Wrap with a div label and input, only input or nothing. |
btnAttributes |
object |
{ type : 'button' } |
Add attribute name - value into new html button. Example:btnAttributes: {
|