Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #569843

    Hi,
    I know this has been asked many many times (I know because I have read and tried all of the solutions to no avail) so I apologize for asking yet again.

    I am using the element Fullwidth Sub Menu which sticks to the bottom of the header upon scroll. The menu links are set to scroll to Color sections on the same page as seen here: staging.loopcreative.co/redseal/product/overview/

    How do I, or is it possible, to have the Sub Menu font color change to #000 black when it scrolls to that specific section?

    I have tried everything and nothing seems to work.

    Thanks!
    Slade

    #571036

    Hi Slade,

    Please try the following in Quick CSS under Enfold–>General Styling:

    .header-scrolled #av-custom-submenu-1 li a .avia-menu-text {
    color:black !important;
    }

    Best regards,
    Rikard

    #571120

    Hi Rikard, thanks for the reply. This didn’t appear to do anything.

    #571762

    Hi!

    Can you please create a new menu in Appearance > Menus by referring to this post – http://kriesi.at/documentation/enfold/add-anchors-to-your-page-for-single-page-navigation/ and edit your Fullwidth Sub Menu element and choose to display that menu?

    Regards,
    Yigit

    #571768

    Hi Yigit!

    I’ve done this..thanks. However it still doesn’t do anything with the “active” states of the submenu items.

    I’m working on this page: http://staging.loopcreative.co/redseal/product/

    I used the code snippet Rikard gave above: `.header-scrolled #av-custom-submenu-1 li a .avia-menu-text {
    color:black !important;
    }`

    #571957

    Hi,

    Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Thanks,
    Rikard

    #571959

    here you go

    The page I’m working on with the Full width submenu is Products

    #572826

    Hi!

    We noticed the same issue as you mentioned. The menu linked to different color sections with ID is not highlighted when the section is active. Usually the menu gets an active class which makes it possible to target the current menu.

    Please deactivate all plugins empty the browser cache and check for the issue and enable the plugins one by one to find out the plugin in conflict.

    Regards,
    Vinay

    #572834

    Hi Vinay, I deactivated all plugins but it still doesn’t show an active state.

    #574124

    Hey!

    We are working on your ticket please be patient we will update the results here soon.

    The theme support highlighting of the main menu items to add the highlight menu feature to the secondary menu we will do the following.

    1. Add unique ID’s and Class to each Color Section
    2. Create new menu and add color section #ID’s to the menu items.
    3. add a code block in wordpress functions.php
    4. Add CSS styles for active menu in Enfold > General Styling > CSS

    1.
    Add a class name “one-page-nav” and unique section ID “section1” to each color section. These ID’s will be same for each menu item that we link to these sections.

    2.
    Add a menu in Appearance > Menu

    Click on “Screen Options” on top right and select “CSS Classes”

    Add unique section #ID’s as menu links and for the active menu add CSS class “active-menu-item” (add this class to the first menu item)

    3.
    Add the following in Appearance > Editor > functions.php

    
    add_theme_support('avia_template_builder_custom_css');
    
    function activateMenuItem(){
    ?>
    <script>
         jQuery(document).scroll(function() {
         var sections = jQuery('.one-page-nav'),
             menu	= jQuery('#menu-onepagenav'),
                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');
    

    4.

    Add CSS styles in Enfold > General Styling > CSS

    
    .active-menu-item {
    /* Your css styles for active menu item*/
    background:gold!important;
    }
    

    If you don’t see the options to add class please enable custom class options in the theme

    http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/

    Cheers!
    Vinay

    • This reply was modified 8 years, 11 months ago by Vinay.
    #574133

    Thanks Vinay!

    Not sure if this helps but I needed to check a few layout issues on my iPad and I noticed that the Active state for the Full Width Submenu works great. For whatever reason it just won’t work on desktop/laptop.

    #574150

    Hey!

    Please follow the steps provided most of which you have already setup. In the above steps make sure the class names on your site match the class name and ID in the code above and add the extra js code block in functions.php and css in Quick CSS. You will have the menu working just like you want it.

    Cheers!
    Vinay

    #574158

    Hi!

    OK hold on I will setup a test page for you then you can check it out.

    We have created a new page with working demo for you here

    http://staging.loopcreative.co/redseal/product-2

    Cheers!
    Vinay

    • This reply was modified 8 years, 11 months ago by Vinay.
    #574325

    Works perfect! Thanks Vinay!! Very much appreciate the extra work you did.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Fullwidth Sub Menu Active Color’ is closed to new replies.