Skip to content
0

katanakit-js / useRemoveClass

Function: useRemoveClass() ​

ts
function useRemoveClass(target, className): void;

Defined in: src/infrastructure/dom/dom.service.ts:169

Removes CSS class(es) from the target element.

Parameters ​

ParameterTypeDescription
targetstring | ElementA CSS selector string or an Element instance.
classNamestring | string[]A single class name or an array of class names to remove.

Returns ​

void

Example ​

ts
useRemoveClass("#header", "sticky");
useRemoveClass(myElement, ["visible", "active"]);

Released under the MIT License.