Name
|
Type
|
Default
|
animationShowDelay
|
Number
|
250
|
Sets or gets the delay of the fade animation when the CheckBox is going to be checked.
Code examples
Set the animationShowDelay property.
$('#jqxCheckBox').jqxCheckBox({ animationShowDelay: 200 });
Get the animationShowDelay property.
var animationShowDelay = $('#jqxCheckBox').jqxCheckBox('animationShowDelay');
|
animationHideDelay
|
Number
|
300
|
Sets or gets the delay of the fade animation when the CheckBox is going to be unchecked.
Code examples
Set the animationHideDelay property.
$('#jqxCheckBox').jqxCheckBox({ animationHideDelay: 200 });
Get the animationHideDelay property.
var animationHideDelay = $('#jqxCheckBox').jqxCheckBox('animationHideDelay');
|
boxSize
|
String
|
"13px"
|
Sets or gets the checkbox's size.
Code examples
Set the boxSize property.
$('#jqxCheckBox').jqxCheckBox({ boxSize:"15px" });
Get the boxSize property.
var boxSize = $('#jqxCheckBox').jqxCheckBox('boxSize');
|
checked
|
Boolean
|
false
|
Sets or gets the check state.
Possible Values:(when the hasThreeStates property value is true)
'true'
'false'
'null'
Code examples
Set the checked property.
$('#jqxCheckBox').jqxCheckBox({ checked:true });
Get the checked property.
var checked = $('#jqxCheckBox').jqxCheckBox('checked');
|
disabled
|
Boolean
|
false
|
Sets or gets whether the CheckBox is disabled.
Code examples
Set the disabled property.
$('#jqxCheckBox').jqxCheckBox({ disabled:true });
Get the disabled property.
var disabled = $('#jqxCheckBox').jqxCheckBox('disabled');
|
enableContainerClick
|
Boolean
|
true
|
Sets or gets whether the clicks on the container are handled as clicks on the check box.
Code examples
Set the enableContainerClick property.
$('#jqxCheckBox').jqxCheckBox({enableContainerClick :true });
Get the enableContainerClick property.
var enableContainerClick = $('#jqxCheckBox').jqxCheckBox('enableContainerClick');
|
groupName
|
String
|
""
|
Sets or gets the group name. When this property is set, the checkboxes in the same group behave as radio buttons.
Code examples
Set the groupName property.
$('#jqxCheckBox').jqxCheckBox({groupName :"Panel" });
Get the groupName property.
var groupName = $('#jqxCheckBox').jqxCheckBox('groupName');
|
height
|
Number/String
|
null
|
Sets or gets the jqxCheckBox's height.
Code examples
Set the height property.
$('#jqxCheckBox').jqxCheckBox({height:"400px"});
Get the height property.
var height = $('#jqxCheckBox').jqxCheckBox('height');
|
hasThreeStates
|
Boolean
|
false
|
Sets or gets whether the checkbox has 3 states - checked, unchecked and indeterminate.
Code examples
Set the hasThreeStates property.
$('#jqxCheckBox').jqxCheckBox({ hasThreeStates:true });
Get the hasThreeStates property.
var hasThreeStates = $('#jqxCheckBox').jqxCheckBox('hasThreeStates');
|
locked
|
Boolean
|
false
|
Sets or gets whether the checkbox is locked. In this mode the user is not allowed to check/uncheck the checkbox.
Code examples
Set the locked property.
$('#jqxCheckBox').jqxCheckBox({locked :true });
Get the locked property.
var locked = $('#jqxCheckBox').jqxCheckBox('locked');
|
rtl
|
Boolean
|
false
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
Code example
Set the rtl property.
$('#jqxCheckBox').jqxCheckBox({rtl : true});
Get the rtl property.
var rtl = $('#jqxCheckBox').jqxCheckBox('rtl');
|
theme
|
String
|
''
|
Sets the widget's theme.
jQWidgets uses a pair of css files - jqx.base.css and jqx.[theme name].css. The base stylesheet creates the styles related to the widget's layout like margin, padding, border-width, position. The second css file applies the widget's colors and backgrounds. The jqx.base.css should be included before the second CSS file.
In order to set a theme, you need to do the following:
|
width
|
Number/String
|
null
|
Sets or gets the jqxCheckBox's width.
Code examples
Set the width property.
$('#jqxCheckBox').jqxCheckBox({width:"200px"});
Get the width property.
var width = $('#jqxCheckBox').jqxCheckBox('width');
|
|
checked
|
Event
|
|
This event is triggered when the checkbox is checked.
Code examples
Bind to the checked event by type: jqxCheckBox.
$('#jqxCheckBox').on('checked', function (event) { // Some code here. });
|
change
|
Event
|
|
This is triggered when the checkbox's state changes from one state to another.
Code examples
Bind to the change event by type: jqxCheckBox.
$('#jqxCheckBox').on('change', function (event) { var checked = event.args.checked; var type = event.args.type; // keyboard, mouse or null depending on how the value was changed. });
|
indeterminate
|
Event
|
|
This event is triggered when the checkbox's checked property is going to be null.
Code examples
Bind to the indeterminate event by type: jqxCheckBox.
$('#jqxCheckBox').on('indeterminate', function (event) { // Some code here. });
|
unchecked
|
Event
|
|
This event is triggered when the checkbox is unchecked.
Code examples
Bind to the unchecked event by type: jqxCheckBox.
$('#jqxCheckBox').on('unchecked', function (event) { // Some code here. });
|
|
check
|
Method
|
|
Checks the checkbox.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the check method.
$('#jqxCheckBox').jqxCheckBox('check');
|
disable
|
Method
|
|
Disables the checkbox.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the disable method.
$('#jqxCheckBox').jqxCheckBox('disable');
|
destroy
|
Method
|
|
Destroys the widget.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code examples
Invoke the destroy thod.
$('#jqxCheckBox').jqxCheckBox('destroy');
|
enable
|
Method
|
|
Enables the checkbox.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the enable method.
$('#jqxCheckBox').jqxCheckBox('enable');
|
focus
|
Method
|
|
Focuses the widget.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code examples
Invoke the focus method.
$('#jqxCheckBox').jqxCheckBox('focus');
|
indeterminate
|
Method
|
|
Sets the indeterminate state(checked property value is going to be null after calling this method).
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the indeterminate method.
$('#jqxCheckBox').jqxCheckBox('indeterminate');
|
render
|
Method
|
|
Renders the widget.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code examples
Invoke the render method.
$('#jqxCheckBox').jqxCheckBox('render');
|
toggle
|
Method
|
|
Toggles the check state. This method is automatically called when the user clicks the checkbox.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the toggle method.
$('#jqxCheckBox').jqxCheckBox('toggle');
|
uncheck
|
Method
|
|
Unchecks the checkbox.
Parameter |
Type |
Description |
None |
|
|
Return Value
None
Code example
Invoke the uncheck method.
$('#jqxCheckBox').jqxCheckBox('uncheck');
|
val
|
Method
|
|
Sets or gets the value.
Parameter |
Type |
Description |
value(optional) |
Boolean |
|
Return Value
Boolean
Code example
Invoke the val method.
// Get the value.
var value = $("#jqxCheckBox").jqxCheckBox('val');
// Get the value using jQuery's val()
var value = $("#jqxCheckBox").val();
// Set value.
$("#jqxCheckBox").jqxCheckBox('val', true);
// Set value using jQuery's val().
$("#jqxCheckBox").val(true);
|