Created
March 3, 2011 22:24
-
-
Save lucasmazza/853747 to your computer and use it in GitHub Desktop.
simple browser detection.
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
var browsers = ['msie', 'webkit', 'opera', 'mozilla']; | |
for(var index in browsers) { | |
var browser = browsers[index]; | |
if($.browser[browser]) $('html').addClass(browser); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment