Search.../

customClassList

A property that represents an element's custom CSS classes.

Description

This property is not yet available to all users.

You can use this property to manipulate the custom CSS classes of an element. For example, you can add a custom class to an element or replace an existing class with a new custom class.

Custom classes are those that you create on your site, not the predefined global classes that are provided for each element.

Note: For more information, see Styling Elements with CSS and the MDN CSS reference docs.

Type:

Mixed in from:$w.Element

Related Content:

$w.CustomClassList

Was this helpful?

Gets a list of the classes of an element

Copy Code
1$w("#myElement").customClassList.values(); // ["className1", "className2"]