I have a series of Bootstrap dropdown functions that display lists of countries for each continent, U.S. states, etc. They look like this:
<nav class="dropdown Canada" style="margin-top: 5px;">
<button class="btn dropdown-toggle" type="button" id="dropdownCanada" data-toggle="dropdown" aria-expanded="true" style="width: 100%; background: #f00; color: #fff;"> <b>Canada</b> </button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownCanada">
<?php
echo join( $Provinces, '' );
?>
</ul>
</nav>
<nav class="dropdown States" style="margin-top: 5px;">
<button class="btn dropdown-toggle" type="button" id="dropdownStates" data-toggle="dropdown" aria-expanded="true" style="width: 100%; color: #fff;"> <b>United States</b> </button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownStates">
<?php
echo join( $States, '' );
?>
</ul>
</nav>
They work fine, but I'd like to put all the country lists inside a dropdown and all the lists of states, provinces, etc. inside another drop down. So when you click a button labeled "Countries," it displays buttons labeled "North America," "Africa," etc. The user would then click North America to see a list of all countries in North America.
But when I put all my drop down buttons inside a similar dropdown button, it only works halfway. When I click on "Countries," it displays a list of buttons, but nothing happens when I click one of these buttons.
Can someone show me how to do this correctly? Or is this something that can't be done with Bootstrap? If there's a better way to do it, that works for me. ;)