Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Detect the user's IE version and add that class to the html tag. JS version of https://gist.github.com/ridgehkr/5985810
var isIE8, test_version;
test_version = 8;
isIE8 = (document.documentMode != null) && document.documentMode === test_version;
if (isIE8) {
return document.documentElement.className += ' ie8';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment