Last active
December 19, 2015 16:39
-
-
Save ridgehkr/5985810 to your computer and use it in GitHub Desktop.
Detect IE versions in JS without conditional compliation. If there's a match, then the IE version class is added to the html tag.
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 characters
test_version = 10 # which version of IE to test for | |
isIE10 = document.documentMode? and document.documentMode == test_version | |
if isIE10 then document.documentElement.className += ' ie10' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment