html5 for lte IE8

Discuss general web development questions. Help others and get help from others.

Moderator: kfury77

html5 for lte IE8

Postby mapleleaf » Tue Apr 26, 2011 12:12 am

For those of you interested here is a JavaScript function that will give lte IE8 html5 elements
Code: Select all

<!--[if IE]>
var html5elments = "address|article|aside|audio|
for(var i = 0; i < html5elmeents.length; i++){

Place the above code just above the closing head element in your html.

Previously, I had mentioned the following code that will accomplish the same result. Which method IF you choose to use is entirely your choice.
In either case, you MUST have the following doctype declared
<!DOCTYPE html>

Code: Select all
<!--[if IE]>
            document.createElement("header" );
            document.createElement("footer" );
            document.createElement("aside"  );
            document.createElement("nav"    );
            document.createElement("hgroup" );
            document.createElement("time"   );
             <strong>Warning !</strong>
             Because your browser does not support HTML5, some elements are simulated using JScript.
             Unfortunately your browser has disabled scripting. Please enable it in order to display this page.

User avatar
Posts: 121
Joined: Thu Oct 14, 2010 2:21 am
Location: Ashcroft, BC Canada

Return to Web Developer Talk

Who is online

Users browsing this forum: No registered users and 1 guest