Sorry my previous answer misread the question. This question has been asked before. You can see a great answer here:
https://stackoverflow.com/a/10965091/2338488
Create a class with the ie type:
<!doctype html>
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->
<head>
then write a check
(function ($) {
"use strict";
// Detecting IE
var oldIE;
if ($('html').is('.ie6, .ie7)) {
oldIE = true;
}
if (oldIE) {
//redirect to chrome installer
window.location.replace("http://www.google.com/intl/en_au/chrome/browser/");
} else {
// ..And here's the full-fat code for everyone else
}
}(jQuery));