Use Select Dropdown as menu

Paste this code into your custom .js file to use a dropdown to navigate to different pages.

// select dropdown for mobile
$(“ul.accordion select”).change(function() {
window.location = $(this).find(“option:selected”).val();
});

The Option in the Select dropdown looks like this:

<option value=”/alabama-liens”>Alabama (41)</option>

In this case when it is selected it will navigate to /alabama-liens in the url.

 

If you want to have a normal menu, but a dropdown on mobile devices use CSS to show/hide the menu or the select dropdown with media queries.

 

Leave a Reply