Created
November 14, 2013 22:50
-
-
Save enlacee/7475731 to your computer and use it in GitHub Desktop.
Codigo js para scroll medio nada mas.
http://stackoverflow.com/questions/7154967/jquery-detect-scrolldown
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
$('body').on('DOMMouseScroll mousewheel', function (e) { | |
if(e.originalEvent.detail > 0 || e.originalEvent.wheelDelta < 0) { //alternative options for wheelData: wheelDeltaX & wheelDeltaY | |
//scroll down | |
console.log('Down'); | |
} else { | |
//scroll up | |
console.log('Up'); | |
} | |
//prevent page fom scrolling | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment