Created
September 11, 2019 16:32
-
-
Save jbd91/3b48c82cbfca9a5d66aa98850e03e0a1 to your computer and use it in GitHub Desktop.
Media Query JS
This file contains hidden or 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 mq = window.matchMedia( "(max-width: 570px)" ); | |
if (mq.matches) { | |
// window width is at less than 570px | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment