I'm updating my website design because it doesn't work properly in IE10.
I was using a combination of conditional comments and JavaScript to handle IE version detection, but since IE10 has dropped the former and I haven't found a reason for it ignoring the latter, I'm seeking help here. I've been reading this thread:
Detect IE version (prior to v9) in JavaScript
But my knowledge of JavaScript isn't far off zilch, so I'm not sure whether I should be looking to modify my code or scrap it and adopt and change the code mentioned in that URL (and if so, how I should do that).
The code I'm currently using:
<link rel="stylesheet" type="text/css" href="barebones.css">
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="ie.css">
<![endif]-->
<!--[if gt IE 8]>
<link rel="stylesheet" type="text/css" href="default.css">
<![endif]-->
<script type="text/javascript">
//<![CDATA[
var appName = window.navigator.appName;
if (appName !== "Microsoft Internet Explorer")
document.write("<link rel=\"stylesheet\" type=\"text\/css\" href=\"default.css\" \/>");//]]>
</script>
If it helps I can post my site URL but I didn't want people to think I'm trying to get more site traffic or something.
I know that the code I'm currently using can be refined a bit but I would rather get things working before having a spring clean.
IE10 on more than one machine seems to ignore the JavaScript completely and I don't know why. IE9 handles it fine.
Any assistance would be much appreciated.