Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect IE7 with jQuery?

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

like image 481
Mithun Sreedharan Avatar asked Jul 02 '10 12:07

Mithun Sreedharan


People also ask

How can I tell if Internet Explorer is being used?

To detect whether the current browser is Internet Explorer, you can make use of the navigator. userAgent property. The userAgent property returns the value of the user-agent header sent by the browser to the server. It contains information about the name, version, and platform of the browser.

How check DIV is display or not in jQuery?

You can use the jQuery :visible selector to check whether an element is visible in the layout or not. This selector will also select the elements with visibility: hidden; or opacity: 0; , because they preserve space in the layout even they are not visible to the eye.

How do I know if I have IE 11?

Press the Alt key (next to the Spacebar) on the keyboard to open a menu bar. Click Help and select About Internet Explorer. The IE version is displayed in the pop-up window.


1 Answers

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

like image 119
Mithun Sreedharan Avatar answered Sep 29 '22 01:09

Mithun Sreedharan