Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
September 13, 2021 at 1:43 pm #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
September 14, 2021 at 7:49 am #1320851Hey 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,
IsmaelSeptember 17, 2021 at 2:55 pm #1321394I 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
September 20, 2021 at 8:23 am #1321575 -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.