UseRemoveClass
katanakit-js / useRemoveClass
Function: useRemoveClass()
Section titled “Function: useRemoveClass()”function useRemoveClass(target, className): void;Defined in: infrastructure/dom/dom.service.ts:169
Removes CSS class(es) from the target element.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
target |
string | Element |
A CSS selector string or an Element instance. |
className |
string | string[] |
A single class name or an array of class names to remove. |
Returns
Section titled “Returns”void
Example
Section titled “Example”useRemoveClass("#header", "sticky");useRemoveClass(myElement, ["visible", "active"]);