Rotate.js is a small library to detect device orientation using the DeviceOrientation Event.