-
AuthorPosts
-
September 17, 2018 at 4:09 pm #1010821
After updating to 4.4.1 I am having some issues with being able to click/tap on the links in the mobile/hamburger menu. Instead of being able to click on the entire area/container of the link (or where you see the highlight/mouse over) it seems a little random where the link will work. It almost seems like the container the li is in isn’t aligned with the link. We haven’t had much luck trying to fix this, so any help would be great. The link to the website is in the private info below. Thanks!
September 17, 2018 at 6:36 pm #1010907Hey NicomIT,
The misalignment was due to the code in your styles.css.
Here is the code you can put in Enfold > General Styling > Quick Css, if it does not work, put into themes/enfold/css/custom.css
@media only screen and (max-width: 767px) { .html_av-overlay-side-classic #top #wrap_all .av-burger-overlay #av-burger-menu-ul li a { top: 0; } }
If you need further assistance please let us know.
Best regards,
VictoriaSeptember 17, 2018 at 6:45 pm #1010916Thanks Victoria. I think that did the trick. Also, it seems like if you click on the nav/menu item of the page you are already on (for example: clicking on “About Us” when you are on the “About Us” page), that nothing happens. The mobile menu remains open instead of closing and taking you to the page. Is there a setting or something that would be causing that? We don’t need to load the page again if you are already on it, but it would be nice if the mobile menu at least closed. Thanks again for the help with the first item.
September 18, 2018 at 6:31 am #1011095Hi,
The modification in this thread should help.
// https://kriesi.at/support/topic/close-mobile-menu-by-clicking-on-active-navigation-item/#post-871977
Best regards,
IsmaelSeptember 18, 2018 at 1:52 pm #1011283Thanks for the link Ismael. I’m not 100% sure after reading through it what code I should replace in the avia.js file. But I think it is this:
//toogle hide/show for submenu items $('.html_av-submenu-display-hover').on( 'mouseenter', '.av-width-submenu', function (e) { $(this).children("ul.sub-menu").slideDown('fast'); }); $('.html_av-submenu-display-hover').on( 'mouseleave', '.av-width-submenu', function (e) { $(this).children("ul.sub-menu").slideUp('fast'); }); $('.html_av-submenu-display-hover').on( 'click', '.av-width-submenu > a', function (e) { e.preventDefault(); e.stopImmediatePropagation(); }); // for mobile we use same behaviour as submenu-display-click $('.html_av-submenu-display-hover').on( 'touchstart', '.av-width-submenu > a', function (e) { var menu = $(this); toggle_submenu( menu, e ); }); //toogle hide/show for submenu items $('.html_av-submenu-display-click').on( 'click', '.av-width-submenu > a', function (e) { var menu = $(this); toggle_submenu( menu, e ); }); function toggle_submenu( menu, e ) { e.preventDefault(); e.stopImmediatePropagation(); var parent = menu.parents('li').eq(0); parent.toggleClass('av-show-submenu'); if(parent.is('.av-show-submenu')) { parent.children("ul.sub-menu").slideDown('fast'); } else { parent.children("ul.sub-menu").slideUp('fast'); } };
And it should be replaced with this:
// close mobile menu if url is the same $('.html_av-submenu-display-click').on( 'click', 'a', function (e) { e.preventDefault(); e.stopImmediatePropagation(); var loc, cur; loc = window.location.href.match(/(^[^#]*)/)[0]; cur = $(this).attr('href').match(/(^[^#]*)/)[0]; if( cur == loc ) { burger.parents('a').eq(0).trigger('click'); } else { window.location.href = $(this).attr('href'); } return false; });
If you could confirm that for me, that would be great.
September 20, 2018 at 12:57 pm #1012273Hi,
You need to insert the modification after this block of code.
//toogle hide/show for submenu items $('.html_av-submenu-display-click').on( 'click', '.av-width-submenu > a', function (e) { var menu = $(this); toggle_submenu( menu, e ); });
You may need to turn off the Performance > File Compression settings if they are enabled.
Best regards,
IsmaelSeptember 20, 2018 at 2:05 pm #1012309Great. Thanks for confirming that Ismael.
September 21, 2018 at 3:03 pm #1012799 -
AuthorPosts
- You must be logged in to reply to this topic.