Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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!

    #1010907

    Hey 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,
    Victoria

    #1010916

    Thanks 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.

    #1011095

    Hi,

    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,
    Ismael

    #1011283

    Thanks 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.

    #1012273

    Hi,

    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,
    Ismael

    #1012309

    Great. Thanks for confirming that Ismael.

    #1012799

    Hi,

    You’re welcome! Please feel free to open a new thread if you need anything else. :)

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.