Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #513427

    Hi,

    I’m new to the enfold theme and want to use it for a new project.

    For single pages there is an option to highlight the anchor in the menu during scrolling. It’s working great. But when I try to apply that to the sidebar menu it doesn’t highlight. Currently I’m testing arround at http://www.haarausfall.men and you can see the test menu in the sidebar. I set up the anchor to the right place and when I click a link in the sidebar menu it scrolls me to the right position but without highlighting. How do I get the same style as in the header menu where highlighting works without any problems?

    Thanks in advance!

    #513784

    I hope it’s okay to bump this thread…

    #514159

    Hey!

    Thank you for using Enfold.

    Add this in the functions.php file:

    // fix sidebar current menu
    add_action('wp_footer', 'wp_footer_mod');
    function wp_footer_mod(){
    ?>
    <script>
    (function($){
    	$('#top .widget_nav_menu li').on('click', function(event) {
            $('#top .widget_nav_menu li').each(function() {
    			$(this).removeClass('current-menu-item');
    		});
    
    		$(this).addClass('current-menu-item');
    	});
    })(jQuery);
    </script>
    <?php
    }

    then use this in the Quick CSS field to change the current menu item color:

    #top .widget_nav_menu li.current-menu-item a {
        color: red;
    }

    Best regards,
    Ismael

    #514478

    Hi!

    Thanks for your reply. Unfortunately, it doesn’t work for me. I made the changes but the only difference is that the selected anchor changes the style when manually clicked. But it doesn’t get automaticaly highlighted when I scroll to the specific section. The header menu works fine and does highlight the anchor when I scroll to the specific section.

    I would be glad if you could find a solution :-)

    Best

    • This reply was modified 8 years, 6 months ago by talipa.
    #514892

    Hi!

    Why do you have two navigations there? The first set is working. Did you use a plugin to build the second set of menu items?

    Best regards,
    Ismael

    #592369

    Hi Ismael,

    I have exactly the same question. Appears that the last question here was unanswered.

    How do we get anchor highlighted when user scrolls to a specific section.

    Link to the page included.

    Kind regards,
    Hiren

    • This reply was modified 8 years, 1 month ago by Hiren.
    #594200

    Hi!

    @hirens please create a new ticket and provide us a temporary user name with ‘administrator’ role and share in private content with permission to deactivate all plugins and add custom code if necessary to help you resolve this issue.

    Best regards,
    Vinay Kashyap

    #594227

    Hi Vinay,

    Not sure how to create a new ticket here. Appears that I am not able to find the option. So please find the login details included herewith:

    CAN YOU AT LEAST REPLY ON THE ABOVE……!!!!!!!

    • This reply was modified 8 years, 1 month ago by Hiren.
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Highlighted Anchors in the Sidebar menü?’ is closed to new replies.