Archived topic
Mobile menu below Logo
10 replies · Started by Roberto Enrique on March 29, 2015
Is it possible to move the mobile menu below the logo?
Where do you currently have it placed? I can provide some javascript that will move it on mobile once I know :)
Thanks!
Right now is placed at the right side of the logo:

I really need to put that menu bellow logo. Can you put me in the right direction, I'm not that proficient with coding.
If it is not possible just let me know.
Thanks in advance
Adding this code to the wp_footer hook should do the trick:
<script type="text/javascript">
jQuery(window).load(function($) {
var mobile, widthTimer;
mobile = jQuery( '.menu-toggle' );
function generateCheckWidth() {
if ( mobile.is( ':visible' ) ) {
jQuery('.main-navigation').appendTo('.inside-header');
} else {
jQuery('.main-navigation').prependTo('.inside-header');
}
}
if ( mobile.is( ':visible' ) ) {
generateCheckWidth();
}
jQuery(window).resize(function() {
clearTimeout(widthTimer);
widthTimer = setTimeout(generateCheckWidth, 100);
});
});
</script>
Let me know if that works or not :)
It works Tom, the style changes a little bit, the menu is now full with but I think I can handle that with some simple css.
Before:

After:
Thank you very much.
Interesting - if you want to send me a URL via email feel free - I may be able to see why it's gone to full width.
I edited my code above - it should work now :)
That was just perfect!
Thanks Tom.
You're welcome :)
Sweet!
