Created
June 27, 2018 10:09
-
-
Save philchanet/e855c6672f31568b52a5a354617caacd to your computer and use it in GitHub Desktop.
Check window width on load and on resize
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
$(window).bind("load resize", function () { | |
let windowWidth = $(window).innerWidth(); | |
if (windowWidth < 768) { | |
... | |
} else if (windowWidth < 1025) { | |
... | |
} else { | |
... | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment