Created
October 15, 2015 17:54
-
-
Save chrisgfortes/c50fc83126b0d6158eae to your computer and use it in GitHub Desktop.
Bloqueando e desbloqueando o scroll jquery
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
// Bloqueia o scroll da tela | |
$('body').on("scroll mousewheel DOMMouseScroll", function(e) { | |
e.preventDefault(); | |
e.stopPropagation(); | |
}); | |
// Desbloqueia o scroll da tela | |
$('body').on("scroll mousewheel DOMMouseScroll", function(e){ | |
$(this).unbind("mousewheel"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment