{"id":2980,"date":"2014-03-13T00:08:46","date_gmt":"2014-03-13T00:08:46","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/13\/how-do-i-target-only-internet-explorer-10-for-certain-situations-like-internet-explorer-specific-css-or-internet-explorer-specific-javascript-code-collection-of-common-programming-errors\/"},"modified":"2014-03-13T00:08:46","modified_gmt":"2014-03-13T00:08:46","slug":"how-do-i-target-only-internet-explorer-10-for-certain-situations-like-internet-explorer-specific-css-or-internet-explorer-specific-javascript-code-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/13\/how-do-i-target-only-internet-explorer-10-for-certain-situations-like-internet-explorer-specific-css-or-internet-explorer-specific-javascript-code-collection-of-common-programming-errors\/","title":{"rendered":"How do I target only Internet Explorer 10 for certain situations like Internet Explorer-specific CSS or Internet Explorer-specific JavaScript code?-Collection of common programming errors"},"content":{"rendered":"<p>Internet Explorer 10 does not attempt to read conditional comments anymore. This means it will treat conditional comments just like any other browser would: as regular HTML comments, meant to be ignored entirely.<\/p>\n<p>Note, however, that conditional compilation in JScript is still supported, as shown in the comments as well as the more recent answers. It&#8217;s not going away in the final release either, unlike <code>jQuery.browser<\/code>.<\/p>\n<p>If you really must target IE10, either use conditional compilation, or &#8211; better yet &#8211; use a feature detection library such as Modernizr instead of browser detection. Pretty cumbersome, but remember that IE10, as a modern browser that&#8217;s highly conformant to today&#8217;s Web standards, is designed such that you <em>shouldn&#8217;t<\/em> have to set aside special code for it, i.e. it&#8217;s supposed to resemble other browsers in terms of behavior and rendering.<sup>1<\/sup><\/p>\n<p><sup>1<\/sup> <sub>And I may be biased when I say this, but it sure as hell does. If your code works in other browsers but not IE10, the odds that it&#8217;s an issue with your own code rather than IE10 are far better than, say, 3 years ago, with previous versions of IE.<\/sub><\/p>\n<p><sub>Of course, while Microsoft has been doing a fantastic job with standards lately, not everyone is perfect, and we all have some old habits and quirks which we know will never quite go away&#8230; but I&#8217;m more than willing to give Microsoft the benefit of the doubt here. Again, I may be biased, but let&#8217;s be real: who&#8217;s to say you&#8217;re not?<\/sub><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Internet Explorer 10 does not attempt to read conditional comments anymore. This means it will treat conditional comments just like any other browser would: as regular HTML comments, meant to be ignored entirely. Note, however, that conditional compilation in JScript is still supported, as shown in the comments as well as the more recent answers. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2980","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2980","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2980"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2980\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}