How to detect IE7 with jQuery?

Mithun Sreedharan picture Mithun Sreedharan · Jul 2, 2010 · Viewed 51.2k times · Source

How to detect IE7 with jQuery possibly using jQuery.browser?

Answer

Mithun Sreedharan picture Mithun Sreedharan · Jul 2, 2010

Got a method

if ($.browser.msie  && parseInt($.browser.version, 10) === 7) {
  alert('IE7'); 
} else {
  alert('Non IE7');
}

-- update

Please note that $.browser is removed from jQuery 1.9