Hi Roman.
I don’t think that it will cover most of the whole screen. It will keep just a menu bar with mobile menu icon on top of the screen.
Very similar to the code provided by your colleague for Sydney theme:
jQuery(function($) {
if ( matchMedia( 'only screen and (max-width: 1024px)' ).matches ) {
var headerFix = $('.site-header').offset().top;
var vDistance = headerFix+280;
var inserated = false
$(window).on('load scroll', function() {
var y = $(this).scrollTop();
if ( y >= vDistance) {
if(inserated == false){
var newHead = $('#masthead').clone();
(newHead).prependTo('body').addClass('masthead-clone').animate({
top: 0
}).resize();
$('.masthead-clone .btn-menu').on('click', function() {
$('.masthead-clone #mainnav-mobi').slideToggle(300);
$(this).toggleClass('active');
});
$(document).on('click', '.masthead-clone #mainnav-mobi li .btn-submenu', function(e) {
$(this).toggleClass('active').next('ul').slideToggle(300);
e.stopImmediatePropagation()
});
inserated = true;
}
} else {
$('.masthead-clone').animate({
top: -200
}).remove();
inserated = false;
}
});
}
});