Wonder
0
Q:

check window resize javascript

//listen for window resize event
window.addEventListener('resize', function(event){
    var newWidth = window.innerWidth;
    var newHeight = window.innerHeight; 
});
7
window.addEventListener("resize", () => {
		// CODE
});
3
window.addEventListener('resize', functionName);
0
<p>Resize the browser window to fire the <code>resize</code> event.</p>
<p>Window height: <span id="height"></span></p>
<p>Window width: <span id="width"></span></p>
0

New to Communities?

Join the community