Skip to content

Instantly share code, notes, and snippets.

@JuanMaRuiz
Created April 30, 2014 10:47
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 JuanMaRuiz/7d6cb6cca3ad34dc856c to your computer and use it in GitHub Desktop.
Save JuanMaRuiz/7d6cb6cca3ad34dc856c to your computer and use it in GitHub Desktop.
Simple code for testing ie version with jQuery. Based on htm5 conditional headers.
/* $HTML-CONDITIONAL-HEADER
<!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="es"> <![endif]-->
<!--[if IE 7 ]> <html class="ie ie7 no-js" lang="es"> <![endif]-->
<!--[if IE 8 ]> <html class="ie ie8 no-js" lang="es"> <![endif]-->
<!--[if IE 9 ]> <html class="ie ie9 no-js" lang="es"> <![endif]-->
<!--[if gt IE 9]><!--><html class="no-js" lang="es"><!--<![endif]-->
<!-- the "no-js" class is for Modernizr. -->
*/
if ($('html').is('.ie6, .ie7, .ie8')) {
oldIE = true;
}
if (oldIE) {
} else {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment