dizmoElements checkbox

The checkbox element transforms your checkboxes into dizmo themed checkboxes. No additional events or anything else is required to use this. It is solely a cosmetic change.

Visual

image-checkbox
image-checkbox

Data type

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

Constraints

The type 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');
});