Created
July 17, 2013 00:41
-
-
Save Hengjie/6016646 to your computer and use it in GitHub Desktop.
Modernizr orientationchange test in CoffeeScript
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
# Chrome Android tends to fire 'resize' events on scroll | |
# This detects it to run certain code using $(window).bind 'orientationchange' | |
# instead of $(window).resize | |
Modernizr.addTest 'orientationchange', -> | |
return !!(window.orientation? and Modernizr.touch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment