/orientation-js

Using js to detect device orientation.

Primary LanguageJavaScript

Orientation-js

Detect device orientation.

Usage

In stylesheets

.portrait .stuff{
  background-color: red;
}

.landscape .stuff{
  background-color: blue;
}

In scripts

if(Orientation.isPortrait()){
  // do something
}

if(Orientation.isLandscape()){
  // do something
}