Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1320722

    Hi

    My developer and I have been trying to remove the fade on the mobile menu, we tried the changes in this thread but it’s not working

    Link to the website in private content

    #1320851

    Hey getfletch,

    Thank you for the inquiry.

    You have to modify the enfold/js/avia-snippet-hamburger-menu.js file, look for this code around line 455.

    if(burger.is(".is-active"))
    			{
    				burger.removeAttr("aria-expanded");
    				burger.removeClass("is-active");
    				htmlEL.removeClass("av-burger-overlay-active-delayed");
    
    				overlay.animate({opacity:0}, function()
    	    		{
    	    			overlay.css({display:'none'});
    					htmlEL.removeClass("av-burger-overlay-active");
    					animating = false;
    	    		});
    
     			}
    			else
    			{
    				set_list_container_height();
    
    				var offsetTop = header_main.length ? header_main.outerHeight() + header_main.position().top : header.outerHeight() + header.position().top;
    
    				overlay.appendTo($(e.target).parents('.avia-menu'));
    
    				burger_ul.css({padding:( offsetTop ) + "px 0px"});
    
    				first_level.removeClass('av-active-burger-items');
    
    				burger.addClass("is-active");
    				htmlEL.addClass("av-burger-overlay-active");
    				overlay.css({display:'block'}).animate({opacity:1}, function()
    				{ 
    					animating = false; 
    				});
    
    				setTimeout(function()
    				{
    					htmlEL.addClass("av-burger-overlay-active-delayed");
    
    				}, 100);
    
    				first_level.each(function(i)
    				{
    					var _self = $(this);
    					setTimeout(function()
    					{
    						_self.addClass('av-active-burger-items');	
    					}, (i + 1) * 125);
    				});
    
    			}
    

    Just remove the animate function and replace it with css.

    if(burger.is(".is-active"))
    			{
    				burger.removeAttr("aria-expanded");
    				burger.removeClass("is-active");
    				htmlEL.removeClass("av-burger-overlay-active-delayed");
    
    				overlay.css("opacity", function() {
    					overlay.css({display:'none'});
    					htmlEL.removeClass("av-burger-overlay-active");
    					animating = false;
    					return 0;
    				});
    
     			}
    			else
    			{
    				set_list_container_height();
    
    				var offsetTop = header_main.length ? header_main.outerHeight() + header_main.position().top : header.outerHeight() + header.position().top;
    
    				overlay.appendTo($(e.target).parents('.avia-menu'));
    
    				burger_ul.css({padding:( offsetTop ) + "px 0px"});
    
    				first_level.removeClass('av-active-burger-items');
    
    				burger.addClass("is-active");
    				htmlEL.addClass("av-burger-overlay-active");
    				overlay.css({display:'block'});
    				overlay.css("opacity", function() {
    					animating = false; 
    					return 1;
    				});
    
    				setTimeout(function()
    				{
    					htmlEL.addClass("av-burger-overlay-active-delayed");
    
    				}, 100);
    
    				first_level.each(function(i)
    				{
    					var _self = $(this);
    					setTimeout(function()
    					{
    						_self.addClass('av-active-burger-items');	
    					}, (i + 1) * 125);
    				});
    
    			}
    

    Best regards,
    Ismael

    #1321394

    I have amended the JS file and put it over the one in the enfold theme but no joy, below is the contents of the edited JS file if you can pass onto support please:

    moved to pastebin: https://pastebin.com/9N99NYcK

    • This reply was modified 3 years, 3 months ago by Ismael. Reason: moved code to pastebin
    #1321575

    Hi,

    Thank you for the update.

    Did you temporarily disable the Enfold > Performance > File Compression settings after doing the modification? You may also have to disable the cache plugin and remove the browser history afterwards.

    Best regards,
    Ismael

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