This PR resolves #10, which didn't mention that Contact Us page navbar-dropdown/link was also kaput. Now navbar dropdown menu labels (actually li elements) behave as links as well, swell!
The problem (general)
It seems that if you have nested lists and if the parent li is behaving as a drop down menu, they cannot behave both as a drop down menu and as a link (at least to the extend of my knowledge atm).
The solution (approach)
To avoid having to manually add new classes in 21 html files, expandableLinks.js adds specific classes to those parent lis, get's the ones we want (4/5 of them) all 5 of them and then binds click event listeners to them.
The handler functions for these click events simply navigate the current page over to the appropriate page by the power of window.location.href.
I left the href attributes with their values in the a tags there because I hope that if there is a cleaner solution maybe someone else can implement it (and still see what was broken). Also there's 21*4 instances I'd have to manually delete them... thanks but no thanks :)
This PR resolves #10, which didn't mention that Contact Us page navbar-dropdown/link was also kaput. Now navbar dropdown menu labels (actually
li
elements) behave as links as well, swell!The problem (general)
It seems that if you have nested lists and if the parent
li
is behaving as a drop down menu, they cannot behave both as a drop down menu and as a link (at least to the extend of my knowledge atm).The solution (approach)
To avoid having to manually add new classes in 21 html files,
expandableLinks.js
adds specific classes to those parentli
s, get'sthe ones we want (4/5 of them)all 5 of them and then binds click event listeners to them. The handler functions for these click events simply navigate the current page over to the appropriate page by the power ofwindow.location.href
.I left the
href
attributes with their values in thea
tags there because I hope that if there is a cleaner solution maybe someone else can implement it (and still see what was broken). Also there's 21*4 instances I'd have to manually delete them... thanks but no thanks :)