Search.../

contains( )

Indicates whether the element's class list contains a specified custom CSS class.

Description

Indicates whether the element's class list contains a specified custom CSS class. Returns true if the element contains the class.

Syntax

function contains(className: string): boolean

contains Parameters

NAME
TYPE
DESCRIPTION
className
string

Custom class to check.

Returns

Return Type:

boolean

Was this helpful?

Indicate whether an element contains a specified class

Copy Code
1$w("#myElement").customClassList.contains("className1"); //true