Created
February 1, 2014 11:44
-
-
Save tyomo4ka/8751203 to your computer and use it in GitHub Desktop.
Approach to run IE specific code when you can not edit HTML code on page directly.
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
var lt_ie_8 = function () { | |
var div = document.createElement("div"); | |
div.innerHTML = "<!--[if lt IE 8]>]><i></i><![endif]-->"; | |
if (div.getElementsByTagName("i").length) { | |
return true; | |
} | |
return false; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment