Search...
checked
Sets or gets whether a switch is on or off.
Description
Setting the checked
property to true
toggles the switch to the on
position. Setting it to false
toggles the switch to the off position.
Getting the checked
property returns whether the switch is on or off.
Type:
booleanRead & Write
Was this helpful?
Get whether a switch is toggled on or off
Copy Code
1let isChecked = $w("#mySwitch").checked; // true
Set a switch to be toggled on
Copy Code
1$w("#mySwitch").checked = true;