setAttribute('display','none') not working
display
is not an attribute - it's a CSS property. You need to access the style object for this:
document.getElementById('classRight').style.display = 'none';
Try this:
setAttribute("hidden", true);
display
is not an attribute - it's a CSS property. You need to access the style object for this:
document.getElementById('classRight').style.display = 'none';
Try this:
setAttribute("hidden", true);