Deprecated

class method Element.classNames

View source on GitHub →

Element.classNames(element) → [String…]

Returns a new instance of Element.ClassNames, an Enumerable object used to read and write CSS class names of element.

Deprecated, please see Element.addClassName, Element.removeClassName, and Element.hasClassName. If you want an array of classnames, you can use $w(element.className).

This method can be called either as an instance method or as a generic method. If calling as a generic, pass the instance in as the first argument.