Created
October 10, 2013 13:05
-
-
Save jimkang/6917993 to your computer and use it in GitHub Desktop.
Running a CSS media query in JavaScript.
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
var isMobileMediaQuery = 'only screen and (max-device-height: 568px)'; | |
if (window.matchMedia(isMobileMediaQuery).matches) { | |
transformString += ('rotate(' + | |
(textPaneIsHidden ? '90deg' : '-90deg') + ') '); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment