Checkbox

Visual

image-checkbox
image-checkbox

Transforms your checkboxes into dizmo themed checkboxes. No additional events or anything else are required to use this. It is solely a cosmetic change.

Data type

<input id="my-checkbox" type="checkbox" data-type="dizmo-checkbox"/><label for="my-checkbox">Description</label>

Constraints

Works only on checkbox elements.

Usage

Manual initialization:

DizmoElements('#my-checkbox').dcheckbox();

Get the current state

var state=DizmoElements('#my-checkbox').prop('checked');

Set the state

DizmoElements('#my-checkbox').prop('checked',true);

React to state changes

DizmoElements('#my-checkbox').on('change',function(){
    var state=DizmoElements('#my-checkbox').prop('checked');
});