Used documentElement.clientWidth/Height. Fixes #313

This commit is contained in:
scottjehl 2010-11-04 10:44:35 -04:00
parent c45b0e3560
commit 81fe1d2aea

View file

@ -156,7 +156,7 @@ $.event.special.swipe = {
$.event.special.orientationchange = {
orientation: function( elem ) {
return document.body && elem.width() / elem.height() < 1.1 ? "portrait" : "landscape";
return document.documentElement && document.documentElement.clientWidth / document.documentElement.clientHeight < 1.1 ? "portrait" : "landscape";
},
setup: function() {