Use a tutorial made for wordpress linke this one -> http://mysitemyway.com/docs/Collapsible_sidebar_menus
and use a jQuery for animation
jQuery(document).ready(function(){
jQuery('.menu .dropdown a').click(function(e){
e.preventDefault();
if (jQuery(this).parent().children('.sub-menu:first').is(':visible')) {
jQuery(this).parent().children('.sub-menu:first').hide();
} else {
jQuery(this).parent().children('.sub-menu:first').show();
}
});
});
Related Posts:
- Using a menu walker add a custom item at the end of the menu’s items
- Add settings to menu items in the Customizer
- Generate a Menu that Displays Child Pages using wp_list_pages() with the New Menu Functionality in WordPress 3.0?
- WordPress Shortcode in Menu Item Title
- Calling the Menu Title within wp_nav_menu array function
- Show current navigation path from menu
- How to hide an item from a menu to logged out users (without a plugin)
- Menu items (all menus) being deleted randomly on their own [duplicate]
- How to apply a class to the second word in menu list item?
- Put a wp_nav_menu inside another one
- different Menu position showing same menu
- How to add bubble count in WordPress wp_nav_menu menu?
- Add class to active top level (grandparent) menu item
- WordPress wp_nav_menu within iFrame
- Generate a Menu that displays all child pages of top level parent
- Check if wp_nav_menu items have submenus
- wp_nav_menu doesn’t generate parent/ancestor classes
- WP_nav_menu fallback not working
- How to conditionally register nav menus with advanced custom fields?
- Pending Custom Link in Menu
- Use walker for specific menu, or avoid use of walker
- Change where navigation bar links?
- Social Links Menu displays icon instead of text (twentyfifteen) [closed]
- has_children in custom nav_walker
- How to give custom classes to the WordPress Menu widget
- No “current-menu-ancestor” class added when browsing an archive page
- Does wp_nav_menu use the gettext filter?
- How to add #navbar to all page links?
- Problems Displaying Multiple WP Menus
- Link that refers to a menu item with dynamically generated URL
- View h2 content tags of a page in sub menu
- How to add custom classes to more than one separate menu’s a link in wordpress?
- Change an li class name in a wordpress custom menu walker
- Custom walker nav – Add sequential number as class
- How to test if blog page is active
- WordPress Custom Menus Issue
- Side Menu Icon Expandable
- wordpress responsive menu not dropping down
- Make nav-menus.php available for editor
- How to use a start_el variable in start_lvl
- Need Random Category Nav Menu
- edit user menu item
- Excluding a media query from specific pages
- Use dashicons in menu items?
- Menu Arrow for Child Element
- Custom menu with different behavior for every item
- Responsive dropdown menu with smaller screen sizes
- Menu separator appearing on next line
- Add a counter beside menu item label
- Why is my array of nav menus returning empty?
- Problem in applying active class to wordpress menu
- Menu is not displaying on the site navigation [closed]
- Creating custom menu with custom themes
- Expected snippet value not showing
- Wp Nav Menu div containers
- Updated WordPress, now Navigation is Messed Up
- Add posts from a category to menu with all posts in it as sub menu
- How to show only current item children using wp_nav_menu?
- Possible to append class to nav menu added to widget area?
- Page dependent sub-menu?
- Removing wp admin menu item on top bar of admin backend
- Error: Declaration of MyClass::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl()
- Nav_walker add id to dropdown ul
- Navbar is hidden behind carousel when using wp-boostrap-navwalker
- WordPress nav-menus not finding page
- Restrict user to edit only edit a certain menu
- Primary menu items are dissapearing
- Where is the source code in the console coming from?
- Migrate old blogroll to menus automatically
- Active Current Menu – Adding class to child theme
- display cart information within li of cart menu item
- WPML CMS Nav and Custom Nav_Walker Undefined Property Notices [closed]
- Add data-track to links in menu
- How to add odd and even classes to all nav links through walker?
- Output sort number in wp menu list item?
- Calling wordpress menu outside ignores custom menu item
- Check in walker if current page is descendant
- Add a non-dynamic phrase/character after a page title?
- Active page link not getting class assigned
- Removing menu item doesn’t get removed on edit post
- change link of menu particular tab
- Next page link via the custom menu
- Customize Walker_nav_menu to show posts if item is category
- Top menu link anchor href value change after online server?
- Menu not always using correct link
- Custom Menus and taxonomies
- How to handle change the appearance of ‘categories’ box on dashboard?
- wp_nav_menu doesn’t show on index page
- How can I stop wp_nav_menu from returning extraneous root links?
- How to add posts with thumbnails to my dropdown menu?
- Automatically add new posts to a specific menu name
- can anyone help me converting my static menu to wp_nav_menu I’am trying to add static menu item to WordPress Menu
- Elegant way of adding an CTA to a menu
- Change Menu Order
- Two Homes In Navigation Menu
- Theme supports only one menu. I need to add more – but how? [closed]
- What is the best way to incorporate responsive dropdown navigation menu into custom theme?
- Submenu items not working anymore
- Icon not shown in Dropdown menus in Twenty Seventeen Theme
- How to change WP menu item type?