10 lines
288 B
JavaScript
10 lines
288 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("navbar");
|
||
|
if (x.className === "navbar") {
|
||
|
x.className += " responsive";
|
||
|
} else {
|
||
|
x.className = "navbar";
|
||
|
}
|
||
|
}
|