skip to Main Content

Disable Mobile Menu Toggle Animation

Important: You can now enable/disable the animation under Customize > Header > Mobile Menu

By default the Toggle mobile menu style uses the javascript slideDown animation but it can be disabled with a little code. When disabled the show/hide functionality will be done via the "visible" classname instead so you can apply custom CSS animations if you wanted or no animation at all.

/**
 * Disable Mobile Menu Toggle Animation.
 *
 * @link https://total.wpexplorer.com/docs/snippets/disable-mobile-menu-toggle-animation/
 */
add_filter( 'wpex_localize_array', funtion( $array ) {
    $array['animateMobileToggle'] = false;
    return $array;
} );
All PHP snippets should be added via child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)
Back To Top