summaryrefslogtreecommitdiff
path: root/js/menu.js
diff options
context:
space:
mode:
authormuqiuhan <[email protected]>2023-02-28 09:58:51 +0000
committermuqiuhan <[email protected]>2023-02-28 09:58:51 +0000
commit7e2f3fca091c08771486df0b870ce187f869d363 (patch)
tree025e1b18a0d94c940a85eb631a7f48951efbc18d /js/menu.js
parent2605fd54aa163fcfc97fc265a300b1b54bf38543 (diff)
downloadblog-7e2f3fca091c08771486df0b870ce187f869d363.tar.gz
deploy: b780169745c17f9fc971299e923e5ca5669b5a22
Diffstat (limited to 'js/menu.js')
-rw-r--r--js/menu.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/menu.js b/js/menu.js
new file mode 100644
index 00000000..9e78fd05
--- /dev/null
+++ b/js/menu.js
@@ -0,0 +1,11 @@
+function toggleMenu() {
+ var menuList = document.getElementsByClassName("menu-list")[0];
+ var menuButton = document.getElementById("menu-btn");
+ if(menuList.classList.contains("active")){
+ menuList.classList.remove("active");
+ menuButton.innerHTML = "MENU";
+ }else{
+ menuList.classList.add("active");
+ menuButton.innerHTML = "<div class=\"icon arrow-up\"> </div>";
+ }
+} \ No newline at end of file