In this article I share how custom menu links can be toggled (open and close) by clicking on an element similar to that in http://travelredbook.com/.
Here's the summary:
- Create a shortcode to output a specific WP menu. We are going to limit the depth to 1 so that only the top level menu items are shown.
- Load Font Awesome for the down pointing arrow on the dropdown "button" at the right.
- Write and load jQuery script which will slide toggle the custom menu when the dropdown button is clicked.
- Add styling so it looks red hot.
Create a file named dd-menu-toggle.js in child theme directory/js (create js directory if not existing) having the following:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.