Append Conditionals
append conditionals w/ jquery
by Ian Roberts
JavaScript
//append conditionals w/ jquery
$("head").append("<!--[if IE 7]>");
$("head").append("<link>");
css = $("head").children(":last");
css.attr({
rel: "stylesheet",
type: "text/css",
href: "css/IE7.css"
});
$("head").append("<![endif]-->");
//add inline style tag
$("head").append("<!--[if IE]>");
$("head").append("<style type='text/css'>.gradient{filter:none;}</style>");
$("head").append("<![endif]-->");
//check that other js at least ran successfully
$("body").append("<div>This Ran</div>");