<input type="checkbox" name="chk" id="chk1" value="1"/>
$('#chk1').puicheckbox();
Name | Parameters | Description |
---|---|---|
change | event: puicheckboxchange event
checked: Boolean value of selected state. |
Fired when value changes. |
$(':checkbox').puicheckbox({ change: function(event, checked) { //.. }});
Name | Parameters | Description |
---|---|---|
check | - | Selects value. |
unselect | - | Unselects value. |
toggle | - | Toggles checked state. |
isChecked | value: Boolean value representing checked state. | Returns checked state. |
enable | - | Enable the widget. |
disable | - | Disable the widget. |
option | name: Name of the option | Returns the value of the option. |
option | name: Name of the option, value: Value of the option | Set the value of the option. |
$('#default').puicheckbox('check');
<script type="text/javascript"> $(function() { $(':checkbox').puicheckbox(); }); </script>
<table> <tr> <td><input type="checkbox" name="chk" id="chk1" value="1"/></td> <td><label for="chk1">Option 1</label></td> </tr> <tr> <td><input type="checkbox" name="chk" id="chk2" value="2"/></td> <td><label for="chk2">Option 2</label></td> </tr> <tr> <td><input type="checkbox" name="chk" id="chk3" value="3" disabled="disabled"/></td> <td><label for="chk3">Option 3</label></td> </tr> </table>