Parameter | Type | Description |
---|---|---|
element | Element | HTML or SVG element to check. |
className | string | The class string. |
Type | Description |
---|---|
boolean | true if the element has the className; else, false. |
Like AddClass and RemoveClass, this method also works with browsers that do not support the HTML element classList property. This method will throw an error if the element is null or undefined.