-
-
Save irazasyed/4126384 to your computer and use it in GitHub Desktop.
jQuery: Browser Detect for html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() | |
{ | |
if ( $.browser.msie ){ | |
if($.browser.version == '6.0') | |
{ $('html').addClass('ie6'); | |
} | |
else if($.browser.version == '7.0') | |
{ $('html').addClass('ie7'); | |
} | |
else if($.browser.version == '8.0') | |
{ $('html').addClass('ie8'); | |
} | |
else if($.browser.version == '9.0') | |
{ $('html').addClass('ie9'); | |
} | |
} | |
else if ( $.browser.webkit ) | |
{ $('html').addClass('webkit'); | |
} | |
else if ( $.browser.mozilla ) | |
{ $('html').addClass('mozilla'); | |
} | |
else if ( $.browser.opera ) | |
{ $('html').addClass('opera'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment