Sets the state of the element.
Set the checked property.
checked
let toggleButton = document.querySelector('jqx-toggle-button');
toggleButton.checked = false;
Get the checked property.
let checked = toggleButton.checked;
Sets the click mode of the button. Possible values: 'hover', 'press', 'release', 'pressAndRelease'.
Set the clickMode property.
clickMode
toggleButton.clickMode = 'release';
Get the clickMode property.
let clickMode = toggleButton.clickMode;
Enables or disables the ratio button.
Set the disabled property.
disabled
toggleButton.disabled = false;
Get the disabled property.
let disabled = toggleButton.disabled;
Sets the inner HTML of the element.
Set the innerHTML property.
innerHTML
toggleButton.innerHTML = 'New Toggle Button Label';
Get the innerHTML property.
let innerHTML = toggleButton.innerHTML;
Sets or gets the widget's name.
Set the name property.
name
toggleButton.name = 'New Name';
Get the name property.
let name = toggleButton.name;
If the custom element is readonly, it cannot be interacted with.
Set the readonly property.
readonly
toggleButton.readonly = false;
Get the readonly property.
let readonly = toggleButton.readonly;
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
Set the rightToLeft property.
rightToLeft
toggleButton.rightToLeft = false;
Get the rightToLeft property.
let rightToLeft = toggleButton.rightToLeft;
Sets or gets the widget's value.
Set the value property.
value
toggleButton.value = 'New Value';
Get the value property.
let value = toggleButton.value;
This event is triggered when the state of the element is changed.
Bind to the change event by type: jqxToggleButton
change
toggleButton.addEventListener('change', function (event) { // event handling code goes here. }