Fix broken toggle
The problem
Houston, we have a problem.
When we toggle the main nav on mobile, it expands everything:
It should expand the main nav only.
This happened bc the implementation of the nav didn't use any available libraries. Instead, the toggle nav was hardcoded in JS, expanding everything within the .header
:
function toggleNavigation() {
nav = document.getElementsByClassName('header')[0]; // this is the guilty one
nav.classList.toggle("active");
}
The solution
Get rid of the current JS code and implement the toggle nav via bootstrap's toggle. This way both are individually toggled by their own selector.
If we can't afford re-write this part of the code for an MVC, we can either:
- Hide the versions' menu on mobile
- Fix the JS code somehow
cc/ @axil @mikelewis
Edited by Marcia Ramos