javascript includes class code example
Example 1: javascript hass class
if (myElement.classList.contains('someClassname')) {
// do something
}
Example 2: js contains class
element.classList.contains('class');
if (myElement.classList.contains('someClassname')) {
// do something
}
element.classList.contains('class');