Skip to content

Commit

Permalink
Add colors so you can tell if a menu item was successfully clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
Joy Clark authored and FND committed Nov 15, 2019
1 parent d9c4e35 commit 61bf683
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,10 @@ <h1>Responsive Mobile Navigation</h1>

function addBodyClass (className) {
let { body } = document
body.classList.remove('red-theme')
body.classList.remove('green-theme')
body.classList.remove('teal-theme')
body.classList.remove('indigo-theme')
body.classList.remove('purple-theme')
let themes = ['red-theme', 'green-theme', 'teal-theme', 'indigo-theme', 'purple-theme']
for (let theme of themes) {
body.classList.remove(theme)
}
if (className) {
body.classList.add(className)
}
Expand Down

0 comments on commit 61bf683

Please sign in to comment.