function myFunction() { var x = document.getElementById("myHeader3"); if (x.className === "header3") { x.className += " responsive"; } else { x.className = "header3"; } }