From 1370d5a48e3ad6645f5b236c5c89eaaa89a83f71 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Tue, 1 Feb 2011 11:54:54 -0500 Subject: [PATCH] add IE version check to gradeA qualifier. --- js/jquery.mobile.core.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.core.js b/js/jquery.mobile.core.js index a26fec7e..ffc2e532 100644 --- a/js/jquery.mobile.core.js +++ b/js/jquery.mobile.core.js @@ -52,7 +52,16 @@ //support conditions that must be met in order to proceed gradeA: function(){ - return $.support.mediaquery; + + //non-UA-based IE version check by James Padolsey, modified by jdalton - from http://gist.github.com/527683 + //allows for inclusion of IE 6+, including Windows Mobile 7 + var ie = (function() { + var v = 3, div = document.createElement('div'), a = div.all || []; + while (div.innerHTML = '', a[0]); + return v > 4 ? v : !v; + }()); + + return $.support.mediaquery || ie && ie >= 6; }, //TODO might be useful upstream in jquery itself ?