Created
November 20, 2013 18:55
-
-
Save giannwilk/7568843 to your computer and use it in GitHub Desktop.
JavaScript: Lock Scroll Bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Lock Scroll | |
$('body').css('overflow','hidden'); | |
$('body').attr('scroll','no'); | |
// Unlock Scroll | |
$('body').css('overflow','auto'); | |
$('body').attr('scroll','yes'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment