The same as the previous page, but with added functionality: collapsing any other previously expanded submenus when clicking/hovering a submenu.
Still NOT responsive, media queries disabled, will behave as a small screen for all screen sizes.
JavaScript version: Extend the JavaScript, add collapseOthersJs().
Checkbox + checked version: Add JavaScript function collapseOthersChk() to uncheck other submenu checkboxes, and thus collapse them.
Checkbox + focus version: Useless, not included here.
Checkbox + hover version: Do nothing, does already collapse others.
Checkbox + hover + checkbox version: Add JavaScript function pinParents() to check/uncheck any parent checkboxes, to pin/unpin an entire nested submenu.
New combination: hover/JavaScript version: Add a checkbox and JavaScript to toggle between hover/click behaviour.
This navbar now has three Javascript functions, toggleAll() to show/hide the entire menu, toggleMe() to show/hide a submenu, and collapseOthersJs() to hide other expanded submenus when clicking on a submenu.
The checkbox version has the same behaviour as the Javascript version.
This version requires more HTML than the pure JavaScript solution (added checkbox for each submenu) , and also almost the same amount of JavaScript, collapseOthersChk().
This navbar is identical to the one in nav2.html, as it collapses other submenus "out-of-the-box", without any JavaScript.
This version now has some added JavaScript function pinParents() to check/uncheck any parent checkboxes, to pin/unpin an entire nested submenu.
This navbar adds an extra checkbox to toggle between hover and click behaviour.
:hover pseudoclass in the "hover" navbar is that it collapses other submenus "out-of-the-box" (no JavaScript required) for both desktops (hover behaviour) and touch screens (click behaviour).