Editor / DOM Helper / isCheckboxChecked
Function: isCheckboxChecked()
ts
function isCheckboxChecked(selector): boolean;Checks whether a checkbox is checked based on a CSS selector.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| A valid CSS selector to identify the checkbox element. |
Returns
boolean
true if the checkbox is checked, otherwise false.
Example
typescript
const isChecked = isCheckboxChecked('#my-checkbox');
console.log(isChecked); // true or false