Add navbar.js

This commit is contained in:
Fred Boniface 2022-10-07 19:46:11 +01:00
parent 6f4b38d99a
commit 3622984ca9

9
js/navbar.js Normal file
View File

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