Last active
June 20, 2018 19:36
-
-
Save jeangontijo/90189a531c80e105c3f537b29262e5ea to your computer and use it in GitHub Desktop.
Set Viewport onResize Function
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 ww; | |
var wh; | |
var setViewport = function () { | |
ww = window.innerWidth || document.documentElement.clientWidth; | |
wh = window.innerHeight || document.documentElement.clientHeight; | |
} | |
setViewport(); | |
window.addEventListener('resize', function () { | |
setViewport(); | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment