Skip to content

Instantly share code, notes, and snippets.

@mauricerenck
Created June 17, 2015 14:49
Show Gist options
  • Save mauricerenck/e7c0bed477ce8a9ebd6c to your computer and use it in GitHub Desktop.
Save mauricerenck/e7c0bed477ce8a9ebd6c to your computer and use it in GitHub Desktop.
[js] Prevent Page-Scrolling when in Lightbox
$(document).bind('cbox_open', function() {
$('html').css({ overflow: 'hidden' });
}).bind('cbox_closed', function() {
$('html').css({ overflow: '' });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment