-
AuthorPosts
-
February 2, 2016 at 5:09 pm #576553
Hi,
I am trying to have the active menu element in the fullwidth submenu in color or underlined. I tried several ideas from other threats. For example this one:
#top .av-subnav-menu > li.current-menu-item a {
color: #78b829 !important;
}and also tried without important and put it at the start of my quick CSS.
Thanks for your Help!
February 4, 2016 at 5:45 pm #577902Hi Powtin!
Ok! we will help you with this customisation :)
Please add the below code at the bottom of functions.php
//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');
Then add the below code in Enfold > General Styling > Quick CSS
/* Your css styles for active menu item*/ .active-menu-item { background:gold!important; }
Regards,
Vinay KashyapFebruary 8, 2016 at 6:23 pm #579809Hi,
I tried it but it is still not working.
It also only recognized the function when I included it in the function-enfold.php
Thanks for your help.
KonstantinFebruary 8, 2016 at 11:33 pm #579968Hi!
Please create a temporary admin login with permission to deactivate all plugins and add custom code if necessary to help you better.
Regards,
Vinay KashyapFebruary 9, 2016 at 11:42 am #580300Hi thanks for taking a look!
February 10, 2016 at 5:46 am #580796Hey!
We added the code at the very bottom of the functions.php file. It’s working now. Please hard refresh the page: http://www.west-aal.at/musterwohnungen/#kommunikation
If you have the time, please create a child theme: http://kriesi.at/documentation/enfold/using-a-child-theme/
Best regards,
IsmaelFebruary 18, 2016 at 2:05 pm #585399Hi,
thanks for your work! It works just fine now!Cheers
-
AuthorPosts
- The topic ‘fullwidth submenu highlight active menu element’ is closed to new replies.