-
AuthorPosts
-
May 27, 2016 at 8:21 am #639149
Hi guys
When drilling down on the top navigation from: MENUS > QUEENSLAND, it displays pages with a Full-Width Sub Menu.
On the default page STARTERS, the very top navigation active color state is displaying correctly on MENUS.
However when clicking on another Sub-Menu item (eg: MAINS / JUNIOR etc), the top nav active state is lost.
How can I retain it?
Site details are below; thanks.
May 27, 2016 at 4:08 pm #639353Hey pantoni,
Have you figured it out already?
They show up fine on my end :)
P.S.: Your site looks great!Best regards,
YigitMay 28, 2016 at 2:05 am #639599Thanks Yigit! Brilliant platform you guys have developed.
I’ve posted a screen grab below indicating where the Top Nav item should be displaying its active state (underline) when clicking on one of its sub-menu child items – in this case MENUS > QUEENSLAND > MAINS.
Thanks
May 28, 2016 at 9:17 am #639690Hi,
The active menu is highlighted correctly please check screenshot below. If you do not see the same please refresh the browser a few times and check again.
Best regards,
VinayMay 28, 2016 at 12:37 pm #639751Hi Vinay
This issue relates only to the MENUS pages – that have full-width sub menus on them.
All the other pages are fine.
Thanks
May 29, 2016 at 9:24 am #639917Hi,
I checked all the main pages on your site but couldn’t find the fullwidth submenu. However you can follow these instructions
Please try adding this at the very end of your themes / child themes functions.php file:
//One page nav highlight function activateMenuItem(){ ?> <script> jQuery(document).scroll(function() { var sections = jQuery('.avia-section'), menu = jQuery('.av-submenu-container'), nav_height = menu.outerHeight(); jQuery(window).on('scroll', function() { var cur_pos = jQuery(this).scrollTop(); sections.each(function() { var top = jQuery(this).offset().top - 300, bottom = top + jQuery(this).outerHeight(); if (cur_pos >= top && cur_pos <= bottom) { menu.find('a').removeClass('active-menu-item'); menu.find('a[href="#' + jQuery(this).attr('id') + '"]').addClass('active-menu-item'); } }); }); }); </script> <?php } add_action('wp_head', 'activateMenuItem');
Please try adding this code to the Quick CSS section under Enfold > General Styling or to your child themes style.css file:
/* onepage nav active menu item*/ @media only screen and (min-width: 769px) { .current_page_item .avia-menu-text, .active-menu-item { color: #b70e14!important; } } /*remove default styles*/ .current-menu-item .avia-menu-text { color: #0a5476!important; } .current-menu-item .avia-menu-fx { display: none; } .active-menu-item .avia-menu-fx { display: block!important; background-color: #c05f5f; border-color: #a03d3d; height: 2px; width: 100%; opacity: 1!important; visibility: visible; }
If you still have any issues please provide a precise link to your site, showing the elements in question? We need to be able to inspect them in order to help :)
Best regards,
VinayMay 30, 2016 at 3:28 am #640074Hi Vinay
As mentioned, all pages under the top nav “Menus” – please see below.
thanks
May 30, 2016 at 10:08 am #640191Hi,
I see that the fullwidth menu is highlighting correctly. If you like the main menu to highlight when a page in fullwidth menu is clicked then you need to make it a child page of the main menu item.
Example :
“Starters” is a child page of “Menu” so the Menu highlights when you select starter. Similarly make the rest of the pages the child page of it’s respective parent menu page.
let us know if you have any questions.
Best regards,
VinayMay 31, 2016 at 3:10 am #640659Hi Vinay
Yes “Starters” is a Custom Link of child page “Queensland” – which is a child of “Menu” – so that is why the main menu is highlighting correctly.
Problem is – how do I create multiple childs for the full-width menu without invoking an additional drop down menu from the top?
Thanks
May 31, 2016 at 7:27 am #640716Hi,
We need to hack it a bit for this to work. Go ahead and create submenus and hide them using the below css :)
.sub-menu { display:none!important; }
Best regards,
VinayMay 31, 2016 at 7:52 am #640724Thanks Vinay
That doesn’t quite work as it hides the current Child 1 drop menu on some of the nav items.
May 31, 2016 at 9:49 am #640781Hi,
Highlight will not work if it’s not added as a child menu. But you can selectively hide the dropdown or submenus using css.
Best regards,
Vinay -
AuthorPosts
- You must be logged in to reply to this topic.