You can achieve this with a simple JQuery selector.
$($('.active').parent('ul').get(0)).css('display', 'none');
We are selecting the parent UL where we find the active class and hiding the element via css.
Related Posts:
- Merge two separate WP menus into one in Mobile view
- Add class to menu ul with active child
- jQuery cookie not working properly in wordpress
- Create search form in menu as in Twenty Fourteen theme
- Hide menu item in certain condition
- How to add fixed position in menu class for Twenty Twelve theme?
- Hierarchical menu nesting problem with jQuery targetting
- superfish.js seems it is not working properly after wordpress upgarde to 4.6.1
- Adding numbers inside a span tag in nav menu [closed]
- Adding toggle-able element after menu item
- WordPress Menu adds an unwanted slash before anchor
- Twenty Fifteen: Change navigation menu behavior
- Drop Down menu expanded by default (on front page) [closed]
- WordPress Menus – How to add inline styles to UL menus
- WP Menu Rollover Nav Item and Effect DIV Elsewhere
- Menu item that hides when you click the previous submenu
- Add class to sub-menu from unrelated element
- Cannot collapse a responsive menu in WordPress
- Add “onclick” option to header menu item
- calling JS to custom menu design
- how do you create this customize menu using wp_nav_menu function?
- Mobile menu not working – jQuery error?
- Walker or wp_get_nav_menu_items VS jQuery
- Foundation Scripts not loading (custom theme)
- Links in new menu don’t work
- jQuery not working when used with wordpress menu
- Jquery dropdown menus working locally, but not in WordPress [duplicate]
- Is it possible to animate the Twenty Eleven menu? [closed]
- wp_nav_menu: show menu only if one exists, otherwise show nothing
- Does Extending Multiple Nav_Menu_Walkers Allow Nested Menus?
- Making breadcrumb with wp_nav_menu
- Renaming a WordPress Admin Menu
- Deleted pages are NOT removed from custom menus?
- How to add active class on current menu item page?
- Add Page ID class to nav menu items
- WordPress nav_menu_link_attributes Not Working
- menu entries are lost
- Nav Menu and display post count
- Automatically Add New Tags to Sub-menu
- Accesibility problems with dropdown menus in twentyten theme or others
- Error “The given object ID is not that of a menu item” on menu with 40+ items
- TwentyTwelve child theme mobile menu not working
- Theme menu in Admin Panel
- How to target children of child pages
- Adding post excerpt into navigation menu
- Editing WordPress Nav Menu Walker
- Convert WP Menu to a Drop Down for Mobile browser
- WordPress Admin Bar Covering & Overlapping Fixed Menu Header [closed]
- Prepend to start of WordPress nav loop
- Change search results order for Admin -> Appearance -> Menus -> Pages -> View all
- Add custom external link to menu
- How I can overlap my menu in my header picture
- How to make the Primary Menu stay the same in the PC and mobile versions of the Twenty Sixteen theme
- How to add notifcations to front-end menu for users when they recieved replies?
- Changing status of Published posts which have less Content to “Draft”
- Main menu highlighting on subpage which is not in submenu but in hierarchy
- Using Zurb’s Foundation Tabs as WordPress Nav (Active Tab)
- Create menu without admin panel
- a better menu, menu options assistance for WP
- Add a custom class to nav li item
- Adding anchors in WordPress Menus
- Can’t display custom menu using name?
- How to add css to single navigation text? [closed]
- how to add data to li for wp_nav_menu?
- How to change the link on the logo at the menu?
- Convert complex HTML menu to WordPress [closed]
- add page to main menu (frontend)
- Creating Menu Links in a Custom Theme
- Nav menu classes ‘has-dropdown’ but no ‘active’
- Add third level menu on wordpress
- How to list menu-item- ids in order for wp_nav_menu
- How to show pages in menu without link
- Drop down menus with wp_nav_menu or wp_page_menu
- Show wp_nav_menu() based on URL with no fallback
- Add prefix to url, but products not showing in page SHOP
- Create link/button to create new post using specific template
- How to use Bootstrap Navbar in wordpress Nav Menu
- wp_nav_menu seems to be printing the wrong menu
- Appearance -> Menu editor completely unresponsive
- Unable to filter/group the menu items based on the category of the pages in the Menu using wp_nav_menu
- Classes CSS (Optional) – how do I reference this in php?
- Replacing nav-menus.php file with standard clean one?
- How to add limited items in WordPress menu?
- Installing compact search in the main menu?
- Next/previous a-like single navigation
- How to create a menu super voice in WP?
- Menu administration, how to allow special charachters
- How to avoid website url appending problem in wp site?
- Bought custom navigation menu from codecanyon, how to change feature.php?
- Somehow lost my MENU from my home page- help!
- How to completely remove the top section with the menu?
- Customizing Responsive Themes Menu [closed]
- How To Conditionally Change Menu In Same Theme Location
- Add menu to CMS page
- Not even able to Log in [closed]
- how can i get the page_ID in nav li [closed]
- How do i add logo in wordpress studiopress (glam theme)?
- Sub menu for a (single) page
- WordPress “add to menu” button not working
- Primary menu shortcode name