Skip to content Skip to sidebar Skip to footer

How To Make Overflow-y: Hidden; Work On Click With Jquery?

My goal is to make sure that on click my menu will be opened and for body it will add CSS option, which is overflow-y:hidden` in order to focus users' attention on menu only. So wh

Solution 1:

You can use it

$(document).ready(function() {
  $('button').on('click', function() {
    $('body').css('overflow-y', 'hidden');
  });
});

Post a Comment for "How To Make Overflow-y: Hidden; Work On Click With Jquery?"