Created
November 16, 2019 12:11
-
-
Save colindensem/940926e9f7ca9e7ca7a55ad3a62c11a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const navToggles = { | |
sidebar: document.getElementById("sidebar"), | |
profileDropdown: document.getElementById("profileDropdown"), | |
sidebarToggle: function() { | |
if (sidebar.style.display === "none") { | |
sidebar.style.display = "block"; | |
} else { | |
sidebar.style.display = "none"; | |
} | |
}, | |
profileToggle: function() { | |
if (profileDropdown.style.display === "none") { | |
profileDropdown.style.display = "block"; | |
} else { | |
profileDropdown.style.display = "none"; | |
} | |
} | |
}; | |
window.sidebarToggle = navToggles.sidebarToggle; | |
window.profileToggle = navToggles.profileToggle; | |
export default navToggles; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment