The method classList.contains('outputDiv')
does not work in IE 9 and older versions. Does anyone know of an alternative solution?
Here is the code I am currently using:
function toggleclass() {
var elems = document.getElementsByClassName("outputDivs");
for (var i = 0; i < elems.length; ++i) {
if (elems[i].classList.contains("outputDivsDesigned"))
elems[i].className = "outputDivs";
else
elems[i].className += " outputDivsDesigned";
}
}
Appreciate any assistance.