jquery Prevent Page Scrolling When a Modal is Open code example
Example: prevent body from scrolling when a modal is opened
$('#adminModal').modal().on('shown', function(){
$('body').css('overflow', 'hidden');
}).on('hidden', function(){
$('body').css('overflow', 'auto');
})