Home › Forums › Support › Menu on mobile › Reply To: Menu on mobile
April 2, 2015 at 9:21 am
#94649
Tom
Lead Developer
Lead Developer
Nice catch! I’ll have to fix this in the next version.
For now, you can add this code to your wp_footer hook:
<script type="text/javascript">
jQuery(window).load(function($) {
var mobile, widthSecondaryTimer;
mobile = jQuery( '.menu-toggle' );
function generateCheckSecondaryWidth() {
if ( mobile.is( ':visible' ) ) {
jQuery('.secondary-navigation').insertAfter('.main-navigation');
} else {
jQuery('.secondary-navigation').appendTo('.gen-sidebar-secondary-nav');
}
}
if ( mobile.is( ':visible' ) ) {
generateCheckSecondaryWidth();
}
jQuery(window).resize(function() {
clearTimeout(widthSecondaryTimer);
widthSecondaryTimer = setTimeout(generateCheckSecondaryWidth, 100);
});
});
</script>