CSS Hack :: Detecting IE11 using Js and CSS


JS

// Can also be used with $(document).ready()
jQuery(window).load(function() {
if(navigator.userAgent.match(/Trident.*rv:11\./)) {
jQuery('body').addClass('ie11');
}

});

CSS
And then in the css file things prefixed with

body.ie11 #some-other-div

 

Advertisements

4 thoughts on “CSS Hack :: Detecting IE11 using Js and CSS

  1. Do you need unlimited content for your site ?
    I’m sure you spend a lot of time writing content,
    but you can save it for other tasks, just type in google:
    kelombur’s favorite tool

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s