I am using JavaScript and I want to add/remove a Class attribute if a button is clicked. I am able to add the class, but I don\'t know how to remove it. how can I do that?
You should consider jQuery, than you can just use this: $('.itemclass').removeClass('classname');
$('.itemclass').removeClass('classname');