fredboniface.co.uk/js/navbar.js
2022-10-07 20:14:11 +01:00

9 lines
289 B
JavaScript

/* Toggle between adding and removing the "responsive" class to topnav when the user clicks on the icon */
function hamburger() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}