0

im using the following code to disable scrolling when a menu is opened. but the content jumps to fill the space where the scrollbar was...is it possible to disable scrolling but show the scrollbar so that the page does not jump to fill the space where the scrollbar was?

.noscroll {
  overflow: hidden;
}
    $('.btn-open-menu').click(function () {
        $('header').addClass('open');
     $('html').addClass('open');
      $('html, body').addClass('noscroll');
    });
gjjr
  • 317
  • 1
  • 9

0 Answers0