From 81fe1d2aeab3d459eee5928f55c59bb73ea4ed7f Mon Sep 17 00:00:00 2001 From: scottjehl Date: Thu, 4 Nov 2010 10:44:35 -0400 Subject: [PATCH] Used documentElement.clientWidth/Height. Fixes #313 --- js/jquery.mobile.event.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.event.js b/js/jquery.mobile.event.js index c92ae0bb..a5d5ddf7 100644 --- a/js/jquery.mobile.event.js +++ b/js/jquery.mobile.event.js @@ -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() {