Treat IE6 users the right way with jQuery
August 06, 20091 comments
IE6 users have probably noticed the effect of the following JavaScript placed at the top of each page:
$(document).ready(function(){For those with reasonably modern, standards-compliant browsers, it looks like this.
if ($.browser.msie && $.browser.version.substring(0,1) <= 6) {
ie6cat = $("<mt:Asset id="680"><mt:AssetLink encode_js="1"/></mt:Asset>")
.attr("rel", "prettyPhoto");
ie6cat.appendTo($("#alpha-inner"));
$("a[rel^='prettyPhoto']").prettyPhoto({showTitle: true});
ie6cat.click();
ie6cat.remove();
} else {
$("a[rel^='prettyPhoto']").prettyPhoto({showTitle: true});
}
});
Categories: blogging ,
internet ,
internet explorer ,
javascript ,
jquery

hello, this is a very friendly ie6 warning! :)
supporting the quirks of ieN is imho a matter of doing a correct stylesheet, then override it selectively with a conditional comment stuff ( or so, forgot the details). it's still a pita, though.