Download
Demo
- Overview
- Documents
User Rating: 0/5 ( 0 votes)
Your Rating:
Picker is a jQuery plugin for replacing default checkboxes and radios.
Source: formstone.it
1. INCLUDE JS AND CSS FILES
<script src="jquery.js"></script> <script src="jquery.fs.picker.js"></script> <link href="jquery.fs.picker.css" rel="stylesheet">
2. HTML
<fieldset> <input type="radio" id="radio_1" name="radio_1" value="Radio One" /> <label for="radio_1">One</label> </fieldset> <fieldset> <input type="checkbox" id="checkbox_1" name="checkbox_1" value="Checkbox One" /> <label for="checkbox_1">One</label> </fieldset>
3. JAVASCRIPT
$("input[type=radio], input[type=checkbox]").picker();
4. OPTIONS
Options are set by passing a valid options object at initialization or to the public "defaults" method. You can also set custom options for a specific instance by attaching a data-boxer-options attribute containing a properly formatted JSON object to the target element.
NAME | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
customClass | string | '' | Class applied to instance |
toggle | boolean | false | Render 'toggle' styles |
labels.on | string | 'ON' | Label for 'On' position; 'toggle' only |
labels.off | string | 'OFF' | Label for 'Off' position; 'toggle' only |
5. METHODS
defaults
Sets default plugin options
$.picker("defaults", opts);
PARAMETER | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
opts | object | {} | Options object |
destroy
Removes instance of plugin
$(".target").picker("destroy");
disable
Disables target instance
$(".target").picker("disable");
enable
Enables target instance
$(".target").picker("enable");
update
Updates instance of plugin
$(".target").picker("update");