Created
January 7, 2015 17:26
-
-
Save thealscott/41aaa8fc755f67ffaab8 to your computer and use it in GitHub Desktop.
Method for returning IE version based on UA string
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
function getIEVersion() { | |
var ua = window.navigator.userAgent, | |
msie = ua.indexOf("MSIE "), | |
version = false; | |
if (msie > 0) { | |
// If Internet Explorer, return version number | |
version = (parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)))); | |
} | |
return version; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment