Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Detect IE versions in JS without conditional compliation. If there's a match, then the IE version class is added to the html tag.
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