Created
November 21, 2013 12:50
-
-
Save stugoo/7581025 to your computer and use it in GitHub Desktop.
Revisions
-
stugoo created this gist
Nov 21, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ // i know, i know, browser sniffing :( // adaptation of http://stackoverflow.com/questions/8348139/detect-ios-version-less-than-5-with-javascript Modernizr.addTest('ios6', function() { var ios6 = false, v, ver = false; if (/iP(hone|od|ad)/.test(navigator.platform)) { v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/), ver = parseInt(v[1], 10); } if (ver == 6) { ios6 = true; } return ios6; }); //usage /* @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) { .ios6 .thing { background: red; } } */