How do I target only Internet Explorer 10 for certain situations like Internet Explorer-specific CSS or Internet Explorer-specific JavaScript code?
I tried this, but
If you want to target IE 10 with Vanilla JavaScript, you might want to try CSS property detection:
if (document.body.style.msTouchAction != undefined) {
document.body.className = 'ie10';
}
Instead of msTouchAction you can also use one of these CSS properties, because they are currently only available in IE 10. But this might change in the future.
I've put together a test page with all properties on CodePen.