javascript check if class in classlist code example
Example 1: js check for class in classList
element.classList.contains(className);
Example 2: if classlist contains js
element.classList.contains(class);
element.classList.contains(className);
element.classList.contains(class);