<p>Checkbox is a plugin for attaching form events to UI checkbox</p>
<p>A checkbox is a <ahref="/module.html">ui module</a> which indicates a user's selection of a choice.</p>
</div>
</div>
<divclass="main container">
<divclass="peek">
<divclass="ui vertical pointing menu">
<aclass="active item">Structure</a>
<aclass="active item">Standard</a>
<aclass="active item">Variations</a>
<aclass="item">Behavior</a>
<aclass="item">Examples</a>
<aclass="item">Getting Started</a>
<aclass="item">Settings</a>
</div>
</div>
<p>UI checkboxes do not need javascript to function correctly, checkboxs can be triggered by matching the label's for attribute to the id tag of an input field</p>
<p>However, there may be situations where it is less work to use javascript to initialize a checkbox then to manually assign ID tags to each field, or you might want to programmatically trigger the checkbox state. In these cases the checkbox module may be useful.</p>
<h2>Examples</h2>
<h3>Initializing a check box</h3>
<divclass="code">$('.ui.checkbox')
.checkbox()
;
</div>
<h2>Standard</h2>
<divclass="shown example">
<h3>Check Box</h3>
<p>The html required for a standard UI checkbox</p>
<divclass="example">
<h4>Check Box</h4>
<p>A standard checkbox</p>
<divclass="ui checkbox">
<inputtype="checkbox"/>
<labelfor="uniqueid"></label>
<divclass="box"></div>
</div>
</div>
<divclass="example">
<h4>Check Box</h4>
<p>A checkbox can function without javascript</p>
<divclass="ui checkbox">
<inputtype="checkbox"id="unique-id"/>
<labelclass="box"for="unique-id"></label>
</div>
</div>
<divclass="example">
<h3>Radio Box</h3>
<p>The html required for a standard UI radio box</p>
<p>A radio box is just a reskinned version of a checkbox, the initialization of the module is the same.</p>
<divclass="ui radio checkbox">
<inputtype="radio"name="foo"/>
<labelfor="uniqueid"></label>
<h4>Form Checkbox</h4>
<p>A checkbox can be found inside a form</p>
<divclass="ui form segment">
<divclass="inline field">
<divclass="ui checkbox">
<inputtype="checkbox"/>
<divclass="box"></div>
</div>
<label>Join Us</label>
</div>
</div>
</div>
<h2>Variations</h2>
<divclass="example">
<h4>Radio Box</h4>
<p>A checkbox can be formatted as a radio element. This means it is an exclusive option.</p>
<divclass="ui radio checkbox">
<inputtype="radio"name="foo"/>
<labelfor="uniqueid"></label>
<label></label>
</div>
</div>
<divclass="example">
<h4>Size</h4>
<p>A checkbox can be a different size.</p>
<divclass="ui large checkbox">
<inputtype="checkbox"name="foo"/>
<label></label>
</div>
<br><br>
<divclass="ui huge checkbox">
<inputtype="checkbox"name="foo"/>
<label></label>
</div>
</div>
<h2>Getting Started</h2>
<p>The plugin must be initialized once before methods can be accessed</p>
<divclass="code">$('.ui.checkbox')
.checkbox()
;</div>
<h2>Behavior</h2>
<p>You can enable a checkbox programmatically using the enable method</p>
<divclass="code">$('.ui.checkbox')
.checkbox('enable')
;</div>
<divclass="example">
<p>A checkbox can be enabled</p>
<divclass="ignore evaluated code">
$('.enable.button')
.checkbox('enable')
;
</div>
<divclass="enable ui button">Enable</div>
<divclass="ui checkbox">
<inputtype="checkbox"/>
<divclass="box"></div>
</div>
</div>
<p>You can enable all checkboxes initialized at the same time by calling the enableAll method</p>
<divclass="code">$('.ui.checkbox')
.checkbox('enableAll')
;</div>
<divclass="code">
$('.ui.checkbox')
.checkbox('enableAll')
;
</div>
<p>You can disable a checkbox programmatically using the disable method</p>
<divclass="code">$('.ui.checkbox')
.checkbox('disable')
;</div>
<divclass="code">
$('.ui.checkbox')
.checkbox('disable')
;
</div>
<p>You can disable all checkboxes initialized at the same time by calling the disableAll method</p>
<divclass="code">$('.ui.checkbox')
.checkbox('disableAll')
;</div>
<divclass="code">
$('.ui.checkbox')
.checkbox('disableAll')
;
</div>
<h2>Getting Started</h2>
<h3>Initializing a check box</h3>
<divclass="code">
$('.ui.checkbox')
.checkbox()
;
</div>
<h3>Defaults</h3>
<tableclass="ui settings table">
<thead>
<thcolspan="3">Callbacks</th>
</thead>
<tableclass="ui settings celled table">
<thead>
<thcolspan="3">Checkbox Settings</th>
</thead>
<tbody>
<tr>
<td>context</td>
<td>false</td>
<td>A selector or jQuery object to use as a delegated event context</td>