jQuery UI & Button: Checkbox

This entry is part 3 of 5 in the series jQuery UI Button

jQuery UI Button – Checkboxes

A checkbox is styled as a toggle button with the button widget. The label element associated with the checkbox is used for the button text.

This demo also demonstrates three checkboxes styled as a button set by calling .buttonset() on a common container.

<!doctype html>
<html lang='en'>
    <meta charset='utf-8'>
    <title>jQuery UI Button - Checkboxes</title>
    <link rel='stylesheet' href='//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css'>
    <script src='//code.jquery.com/jquery-1.9.1.js'></script>
    <script src='//code.jquery.com/ui/1.10.4/jquery-ui.js'></script>
    <link rel='stylesheet' href='https://codecrawl.com/code/jqueryui/jqueryui_style.css'>
        $(function () {
        #format {
            margin-top: 2em;

<input type='checkbox' id='check'><label for='check'>Toggle</label>

<div id='format'>
    <input type='checkbox' id='check1'><label for='check1'>B</label>
    <input type='checkbox' id='check2'><label for='check2'>I</label>
    <input type='checkbox' id='check3'><label for='check3'>U</label>

Try The Code

Series Navigation<< jQuery UI & Buttons: Mediaplayer Toolbar
jQuery UI & Button: Radio Button >>