diff options
| author | muqiuhan <[email protected]> | 2024-10-18 15:51:24 +0000 |
|---|---|---|
| committer | muqiuhan <[email protected]> | 2024-10-18 15:51:24 +0000 |
| commit | 21ead6027c75cca30c0649b6fd0b0bbfbfb12c5c (patch) | |
| tree | 3eff0a1b665877daa786f85a95d50cc29eabcb3c /js | |
| parent | 3c03c9b03a084984383b510f6b795df3bfaf5ca7 (diff) | |
| download | blog-21ead6027c75cca30c0649b6fd0b0bbfbfb12c5c.tar.gz | |
deploy: 00b64b43be219c446a7afcaebdb378f56e737a8e
Diffstat (limited to 'js')
| -rw-r--r-- | js/menu.js | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,11 +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>"; - } + 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>"; + } } |
