Search.../

remove( )

Removes custom CSS classes from an element's class list.

Description

Removes one or more custom CSS classes from an element's class list.

Syntax

function remove(className: ...string): void

remove Parameters

NAME
TYPE
DESCRIPTION
className
string

The custom class to remove from the element's list of classes.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

Remove a single class from an element

Copy Code
1$w("#myElement").customClassList.remove("className1");
Remove multiple classes from an element

Copy Code
1$w("#myElement").customClassList.remove("className1", "className2");