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
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 a plugin (we recommend Code Snippets)
Back To Top