Mobile viewport height after orientation change
Use the resize event The resize event will include the appropriate width and height after an orientationchange, but you do not want to listen for all resize events. Therefore, we add a one-off resize event listener after an orientation change: Javascript: window.addEventListener(‘orientationchange’, function() { // After orientationchange, add a one-time resize event var afterOrientationChange = … Read more