Using plain JavaScript (not jQuery), Is there any way to check if an element contains a class?
Currently, I\'m doing this:
The easy and effective solution is trying .contains method.
test.classList.contains(testClass);