window.addEventListener('orientationchange', function(e){ var isUpright = (window.orientation == 'landscape'); }); Auto Orion - Massy Motors - 2019