Method ToggleClass
ToggleClass(string, string)
Toggles the presence of a CSS class on the target element.
Declaration
Task ToggleClass(string selectorOrElement, string className)
Parameters
| Type | Name | Description |
|---|---|---|
| string | selectorOrElement | A CSS selector or ElementReference targeting the DOM element. |
| string | className | The class name to toggle. |
Returns
| Type | Description |
|---|---|
| Task | A task representing the asynchronous operation. |
ToggleClass(ElementReference, string)
Toggles the presence of a CSS class on the target element.
Declaration
Task ToggleClass(ElementReference elementRef, string className)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementReference | elementRef | A reference to the HTML element. |
| string | className | The class name to toggle. |
Returns
| Type | Description |
|---|---|
| Task | A task representing the asynchronous operation. |