Created
January 31, 2011 16:54
-
-
Save Nutrox/804358 to your computer and use it in GitHub Desktop.
JavaScript - Partial HTML5 element rendering fix for MSIE
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
if( /MSIE [6-8]\./.test(navigator.userAgent) ) { | |
// These elements will be treated like <span> elements by MSIE, | |
// but you can use CSS to style them like any other element. | |
var elements = [ | |
"article", | |
"aside", | |
"footer", | |
"header", | |
"nav", | |
"section" | |
]; | |
while( elements.length ) { | |
document.createElement( elements.pop() ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment