Picker

A jQuery plugin for replacing default checkboxes and radios.

Current Version: 3.0.11


Usage

Installation

Include the following resources on your page before initializing:

<script src="jquery.fs.picker.js"></script>
<link href="jquery.fs.picker.css" rel="stylesheet">

Bower

You can deploy and update via the command line with Bower:

bower install Picker

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

Methods

Methods are publicly available to all active instances, unless otherwise stated.

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");