Created
August 22, 2013 23:01
-
-
Save deanohyeah/6313830 to your computer and use it in GitHub Desktop.
js mediaquery
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
<script type="text/javascript"> | |
var mediaQuery; | |
//checks for browser support ie < 10 no support | |
if(typeof window.matchMedia == 'function'){ | |
mediaQuery = window.matchMedia("(max-width: 767px)").matches; | |
}else{ | |
mediaQuery = false; | |
} | |
if (!mediaQuery) { | |
//runs mediaquery rules | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment