Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 70112b1

Browse files
author
scottjehl
committed
add IE version check to gradeA qualifier.
1 parent 6855363 commit 70112b1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

js/jquery.mobile.core.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,16 @@
5555

5656
//support conditions that must be met in order to proceed
5757
gradeA: function(){
58-
return $.support.mediaquery;
58+
59+
//non-UA-based IE version check by James Padolsey, modified by jdalton - from http://gist.github.com/527683
60+
//allows for inclusion of IE 6+, including Windows Mobile 7
61+
var ie = (function() {
62+
var v = 3, div = document.createElement('div'), a = div.all || [];
63+
while (div.innerHTML = '<!--[if gt IE '+(++v)+']><br><![endif]-->', a[0]);
64+
return v > 4 ? v : !v;
65+
}());
66+
67+
return $.support.mediaquery || ie && ie >= 6;
5968
},
6069

6170
//TODO might be useful upstream in jquery itself ?

0 commit comments

Comments
 (0)