Check current device orientation

Check current device orientation

BY 29 Jan 2016 Web Code Snippet
Checks device orientation in two ways by using window and screen object window.orientation returns one of 4 items: 0, 90, -90 and 180 screen.orientation returns: portrait-primary, landscape-primary, landscape-secondary, portrait-secondary
Written by