Skip to content

Instantly share code, notes, and snippets.

@rblakejohnson
Created September 23, 2013 22:20
Show Gist options
  • Save rblakejohnson/6677782 to your computer and use it in GitHub Desktop.
Save rblakejohnson/6677782 to your computer and use it in GitHub Desktop.
JS: browser detect
(function(){
var putHere = $("html"),
curBrowser;
if($.browser.msie){
curBrowser = "ie";
putHere.addClass("ie"+parseInt($.browser.version,10));
}
if($.browser.webkit){
curBrowser = "webkit";
}
if($.browser.mozilla){
curBrowser = "mozilla";
}
putHere.addClass(curBrowser);
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment