$(window).bind("orientationchange", function(e){
var ow = (e.orientation=="portrait" ? "縦" : "横");
alert("端末の向きは "+ow+" です。");
});
using the above code, i could determine if the device is in portrait or landscape mode. But my question is, is it possible to determine which side on the landscape (landscape right/ landscape left) is the device tilted, also if the device is upsidedown?
thanks guys for the support.
$(window).bind('orientationchange', function() {
alert(window.orientation);
});
I would take into consideration this post:
http://www.matthewgifford.com/2011/12/22/a-misconception-about-window-orientation/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With