I have multiple span elements, I try to remove the class activeLang.
How can I do this?
Remove . from the classname
el.classList.remove("activeLang");
window.onload = function() {
var x = document.getElementsByClassName("activeLang");
console.log(x[0]); //will print the object
[].forEach.call(x, function(el) {
el.classList.remove("activeLang");
});
console.log(x[0]); //will no longer print the object
};
...
...
...