How can I check in JavaScript if a DOM element contains a class?
I tried the following code, but for some reason it doesn\'t work...
if (document.get
It's the .className property, like this:
if (document.getElementById('element').className == "class_one") { //code... }