Reply To: Mobile menu above header

Home Forums Support Mobile menu above header Reply To: Mobile menu above header

#206383
Annamalai

My Goal is need to move the Primary menu above the logo on the page load itself during mobile view i.e
for Responsive. When i debugged found that move-navigation.min js creating plugin. I
have done the following things

http://1cb.424.myftpupload.com/

1. Using Snippets plugin Deregister the move-navigation.js:

` add_action( ‘wp_print_scripts’, ‘my_deregister_javascript’, 100 );
function my_deregister_javascript() {
wp_deregister_script( ‘move-navigation’ );
}`

2. Next I added the script in wp_footer of GP_Hooks



jQuery(document).ready(function($) {

  generateMoveNav(); // Call on page Load 
  
  jQuery(window).resize(function() {
	 if(jQuery(window).width() < 751){ // During Resize
         		generateMoveNav();
		 }
	});
  
	function generateMoveNav() {
            var mobile = jQuery( '.menu-toggle' );

		if ( mobile.is( ':visible' )) {
			jQuery('.main-navigation').insertBefore('.site-header');

		} else {

		}
	}

});

But still move-navigation.js not getting removed