jQuery Mobile - Checkbox Widget

Checkboxes are used when more than one option is required to be selected. They are created using <input> tag but the type attribute is set to checkbox.

Following table demonstrates the types of checkbox in detail.

Sr.No. Type & Description
1 Basic markup

Checkbox can be created by using the <input> element with a type = "checkbox" attribute and corresponding label.

2 Mini size

In element include attribute data-mini = "true" for creating mini version.

3 Vertical group

By default, the checkbox is set vertically.

4 Horizontal group

Set the checkbox horizontally by including the data-type = "horizontal" to the fieldset

5 Icon position

The position of the checkbox icon button can be set at the right side using data-iconpos = "right" attribute to the fieldset.

6 Theme

Theme is set to the checkbox using attribute data-theme.

7 Disabled

Set the attribute disabled = "" in the input to disable the checkbox.

8 Enhanced

The checkbox is enhanced using the data-enhanced = "true" into the input field.

Kickstart Your Career

Get certified by completing the course

Get Started