I'm having some issue with the Extjs elements that we implement on our site and need to perform some IE10 specific styling to fix these issues. I understand that IE10 no longer supports the old IE style comments where you could conditionally specify a different html tag with a different class appended depending on the version of IE. So, in this case I'm going to have to use jQuery to append an IE10 class the HTML tag which isn't the best solution but as our users are required to have Javascript enabled anyway it's the best option we have for the moment.
I'm current using the following segment of code to try and achieve this:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>
<script type="text/javascript">
if ($.browser.msie && $.browser.version == 10) {
$("html").addClass("ie10");
}
</script>
However if I look in the developer mode / view the source of the page in IE10, nothing is being appended to the HTML tag. I then used Firebug (because IE developer tools are terrible) to check whether there are any issue with the script I was using and I have the following message in my console:
TypeError: $.browser is undefined
[Break On This Error]
if ($.browser.msie && $.browser.version == 10) {
As I rarely use Javascript for browser detection I admit that I borrowed this script from the web and the comments all suggested it works but as you can see it clearly doesn't.
Does anyone have any ideas as to how this can be adapted so that it does work or indeed any alternatives that I could use to target IE10 specifically with my CSS?