I have a lightbox displaying various content:
$('.mehr').click(function() {
$('#lightbox').css({'visibility' : 'visible'}).animate({'background-color': 'rgba(0, 0, 0, 0.9)', 'opacity': '1'}, 500);
});
$('.close').click(function() {
$('#lightbox').stop().animate({'background-color': 'rgba(0, 0, 0, 0)', 'opacity': '0'}, 500, function(){$(this).css({'visibility' : 'hidden'});});
});
I need to prevent the user from scrolling when #lightbox is visible. Is there a way to deactivate the browser's scrollbars when #lightbox becomes visible and then reactivate them when #lightbox is closed?