Steven Tan wrote
So watch out if you rely on js libraries that do something like this:
$("body").append("<section>something</section>");
$("section").text("new something"); // this line will throw an error in IE. Hope that makes sense.

Ah, I understand, interesting.  I've done some example cases:

Base case for reference, loads html5shiv to render static content (works in IE8):
http://www.boogdesign.com/examples/html5shiv-static.html

Load html5shiv, create element with jQuery then change with jQuery (fails in IE8):
http://www.boogdesign.com/examples/html5shiv-jquery.html

Load html5shiv, use DOM methods to create element, change with jQuery (works in IE8):
http://www.boogdesign.com/examples/html5shiv-dom-jquery.html

Load html5shiv, use innerHTML to create element, change with jQuery (works in IE8):
http://www.boogdesign.com/examples/html5shiv-inner-jquery.html

So it looks like this is the broken part:

$("body").append("<section>something</section>");

If you create the element with other methods, the next line works fine.

Rob


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to