For the dropdowns to be displayed correctly while the nav bar is collapsed:
<div class="nav-collapse">
was changed to:
<div class="nav-collapse collapse">
The collapse logic expects the collapsible element to already have class "collapse".
The "collapse" class gets added when you expand the nav (if it is not already present), which is why the dropdown menu currently works only when you open, close, and then re-open the nav a second time.
For the dropdowns to be displayed correctly while the nav bar is collapsed:
<div class="nav-collapse">
was changed to:
<div class="nav-collapse collapse">
The collapse logic expects the collapsible element to already have class "collapse".
The "collapse" class gets added when you expand the nav (if it is not already present), which is why the dropdown menu currently works only when you open, close, and then re-open the nav a second time.