-
AuthorPosts
-
February 27, 2017 at 9:33 pm #752527
Hey guys!
I have noted that main menu option for the theme is really touchy and not smooth for sub-menu items only.
If you hover over WHAT WE DO … it’s annoyingly fast and impacts accessibility negatively…meaning I have to try a few times and be very precise in order to click on a sub-men item. Any thoughts?March 2, 2017 at 9:58 am #754222Hi Justin!
Thank you for using Enfold.
You can adjust the speed but you have to modify one of the parent theme files. Edit the js > avia.js file, look for this code:
new_menu.find('li').hover(function () { $(this).children("ul.sub-menu").slideDown('fast'); }, function () { $(this).children("ul.sub-menu").slideUp('fast'); });
Adjust the duration. Default value is “fast”.
// http://learnjavascript.co.uk/jq/reference/effects/slidedown.html
Best regards,
IsmaelMarch 2, 2017 at 4:14 pm #754397Understood, thank you. I’ll give it a go…
March 2, 2017 at 4:17 pm #754399Thanks, that works better for me. Does the js library with the avia file need to be added to the child theme? How doI prevent this being saved over every time I upgrade the theme? Thanks!
March 3, 2017 at 8:25 am #754900Hi!
You can adjust the speed BUT you have to modify one of the parent theme files
I’m sorry but you cannot do this modification in a child theme. I will ask Kriesi if he will consider setting the duration to “slow” by default.
Cheers!
IsmaelMarch 10, 2017 at 2:42 pm #758911Hi!
Great tip, is it possible to make the sub-menus visible all the time?Thanks,
JörgenMarch 14, 2017 at 5:51 pm #760889Hi Jörgen,
You could edit Edit the js > avia.js file and change burger_wrap.click function remove hover handler
new_menu.find('li').hover(function () { $(this).children("ul.sub-menu").slideDown('fast'); }, function () { $(this).children("ul.sub-menu").slideUp('fast'); });
and add
new_menu.find('li').each(function() { $(this).children("ul.sub-menu").slideDown('fast'); });
instead.
Let me know if it worked for you.
Best regards,
VictoriaMarch 14, 2017 at 6:32 pm #760903Thank you that works, however I wanted the sub-menu visible from the start so I got a tip about adding this css instead:
#av-burger-menu-ul li ul { display: block !important; height: auto !important; }
Best regards,
JörgenMarch 16, 2017 at 6:19 am #761732Hi Jörgen,
Thanks for the feedback, so you got everything working as it should now?
Best regards,
RikardMarch 16, 2017 at 3:42 pm #761998I personally reverted back to the regular menu. I am convinced that hamburger menu is only good for a very simple navigational structure, and not meant for too many sub-menu items.
March 16, 2017 at 4:00 pm #762015Hi,
Let us if you have some question :)
Best regards,
John Torvik -
AuthorPosts
- You must be logged in to reply to this topic.