I don't want to use styles from style.css, so I decided to remove style.css from DOM. This work just fine in Firefox and IE8, but not in IE6:
$(LINK[href='http://www.example.com/style.css']).remove();
Any other solution, with jQuery?
Here is example:
HTML:
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<meta http-equiv=Content-Type content=text/html; charset=utf-8 />
<title>Testing</title>
<script type=text/javascript src=path/to/jquery.js></script>
<script type=text/javascript>
$(document).ready(function() {
$(link[href*='style.css']).remove();
});
</script>
<link rel=stylesheet type=text/css href=style.css />
</head>
<body>
<div id=content>...</div>
</body>
</html>
And here is CSS (style.css):
#content {
background-color:#333;
}
Only in IE #content is still dark. :(
Maybe is jQuery bug?