jQuery Mobile: Theme B Checkbox

This entry is part 18 of 73 in the series jQuery Mobile

Taking this opportunity, we look at building checkboxes with a theme.

The following example is built with theme B.

Theme B
<!DOCTYPE html>
    <link href='http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css' rel='stylesheet'/>
    <script src='http://code.jquery.com/jquery-1.10.2.min.js'></script>
    <script src='http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js'></script>
<div data-role='page' id='pageone'>
    <div data-role='header'><h1>Checkbox App</h1></div>

    <p>Theme B</p>
        <fieldset data-role='controlgroup'>
            <input type='checkbox' name='checkbox_a' id='checkbox_ida' data-theme='b'>
            <label for='checkbox_ida'>One</label>
            <input type='checkbox' name='checkbox_b' id='checkbox_idb' data-theme='b'>
            <label for='checkbox_idb'>Two</label>
            <input type='checkbox' name='checkbox_c' id='checkbox_idc' data-theme='b'>
            <label for='checkbox_idc'>Three</label>

    <div data-role='footer' data-position='fixed'>
Try The Code

Theme B is specified by using data-theme=’b’.

Series Navigation<< jQuery Mobile: Icon Position Right Of Checkbox
jQuery Mobile: Disabled Checkbox >>

Leave a comment

Leave a Reply