171
rated 0 times
[
178]
[
7]
/ answers: 1 / hits: 59415
/ 14 Years ago, tue, november 23, 2010, 12:00:00
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.getElementById('element').class == class_one) {
//code...
}
More From » html