-
AuthorPosts
-
February 14, 2015 at 11:57 pm #396240
Hello,
I am using the fullwidth submenu on one page that has several IDs. Normally, within the normal main menu, the items highlight when scrolling past a section ID. For, example, your one page restaurant demo shows it. However, this feature is not there for the fullwidth submenu. Is it possible to achieve the same or similar functionality? How?
Thank you and regards,
February 16, 2015 at 10:43 am #396574February 16, 2015 at 11:09 am #396593This reply has been marked as private.February 16, 2015 at 8:05 pm #397020Hi!
Add this to the functions.php file:
add_action('wp_footer', 'ava_current_menu'); function ava_current_menu(){ ?> <script> (function($){ $(window).load(function() { $("#top .av-subnav-menu li a").click(function() { $("#top .av-subnav-menu li a").removeClass("active"); $(this).addClass("active"); }); }); })(jQuery); </script> <?php }
Use this to change on the Quick CSS field to change the color of the active menu:
.main_color .av-subnav-menu a.active { color: violet; }
Remove browser cache then reload the page.
Cheers!
IsmaelFebruary 16, 2015 at 9:09 pm #397076This reply has been marked as private.February 17, 2015 at 10:01 am #397321Hey!
Hmm.. It’s working when I test it on my installation. Please send us the login details so that we can check it.
Regards,
IsmaelFebruary 17, 2015 at 3:51 pm #397557This reply has been marked as private.February 18, 2015 at 12:03 pm #398034Hi!
We had to change .main_color to .alternate_color. It’s working now: http://www.techbiryani.com/professional-profile
Cheers!
IsmaelFebruary 18, 2015 at 1:12 pm #398076HI Ismael,
Yes, thanks. It’s working in that when the menu is selected, the color changes to violet.
However, what I was looking for was that when the page is scrolled and the each section is crossed, the menu should change according to the section being crossed….similar to how it happens for the main menu.
If it cannot be done for the fullwidth, that’s fine.
Regards,
February 19, 2015 at 1:50 pm #398880February 19, 2015 at 2:13 pm #398903February 20, 2015 at 4:40 am #399438Hey!
Alright. I’m sorry but it’s not possible without custom modification on the theme. Unfortunately, this falls outside the scope of support. Please hire a freelance developer.
Regards,
IsmaelSeptember 16, 2015 at 10:22 am #503898Hi Ismael,
I’m having trouble with the functions and css code you suggested.
I have done as described above, as I’m trying to have to submenu be highlighted with color, so that you can see which of the menu entries are selected (which page i’m on). But I cannot get I to work.
September 17, 2015 at 5:57 am #504500 -
AuthorPosts
- You must be logged in to reply to this topic.