Created
October 27, 2014 13:03
-
-
Save zeropaper/7e1a8f5b7f53be7b4be1 to your computer and use it in GitHub Desktop.
The sales guys at MS pretend it's not needed anymore they probably never wrote a line of CSS... :(
This file contains 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 characters
// Inspired by http://jsfiddle.net/evildonald/jLuF5/ | |
function detectIE() { | |
var $ = window.$ || window.jQuery || angular.element; | |
var s = document.body.style; | |
var version; | |
if (s.msTextCombineHorizontal !== undefined) { | |
version = 11; | |
} | |
else if (s.msFlexOrder !== undefined) { | |
version = 10; | |
} | |
else if (s.msTransform !== undefined) { | |
version = 9; | |
} | |
if (version) { | |
$('html').addClass('ie ie'+version); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment