I am using some code to disable scrolling and also retain the scrollbar when the fullscreen menu is active, but when the menu is opened by clicking the hamburger icon, the page jumps to the top. Any idea how to stop this happening?
.noscroll {
position: fixed;
overflow-y:scroll;
}
jQuery(document).ready(function($){
$('.btn-open-menu').click(function () {
$('html, body').addClass('noscroll');
})
$(document).on('click','.btn-close-menu', function(event){
$('html, body').removeClass('noscroll');( {}, event);
})
});```