Skip to content

Instantly share code, notes, and snippets.

@srcoley
Created October 4, 2011 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srcoley/1262473 to your computer and use it in GitHub Desktop.
Save srcoley/1262473 to your computer and use it in GitHub Desktop.
Determine browser version if Internet Explorer, and give the body element a respective class.
var b = $.browser;
if(b.msie) {
var v = b.version.split('.')[0];
$('body').addClass("ie ie" + v);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment