Created
April 24, 2013 19:48
-
-
Save ornj/5455004 to your computer and use it in GitHub Desktop.
Modernizr < IE9 test. Some times you have to do what you have to do.
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
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class=""> <!--<![endif]--> |
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
/** | |
* Check if browser is IE less than 9. Due to the IE conditions in the HTML, non-Internet Explorer | |
* browsers will always have false returned. | |
*/ | |
Modernizr.addTest('ltie9', function() { | |
return (document.getElementsByTagName('html')[0].className.indexOf('lt-ie9') > -1) ? true : false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment