![Check out Enfold](https://kriesi.at/wp-content/themes/kriesi/images/banner-enfold.jpg)
Tagged: anchor, highlight, Sidebar Menu, table of content
-
AuthorPosts
-
October 4, 2015 at 11:31 pm #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!
October 5, 2015 at 2:08 pm #513784I hope it’s okay to bump this thread…
October 6, 2015 at 7:26 am #514159Hey!
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,
IsmaelOctober 6, 2015 at 3:57 pm #514478Hi!
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, 11 months ago by
talipa.
October 7, 2015 at 5:02 am #514892Hi!
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,
IsmaelMarch 3, 2016 at 1:14 am #592369March 7, 2016 at 11:21 am #594200Hi!
@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 KashyapMarch 7, 2016 at 11:57 am #594227Hi 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, 6 months ago by
Hiren.
-
This reply was modified 8 years, 11 months ago by
-
AuthorPosts
- The topic ‘Highlighted Anchors in the Sidebar menü?’ is closed to new replies.