JQuery – Simple IE 6 Detection

Tuesday, February 23, 2010 3:48
Posted in category tech-titbit

A simple way to detect whether the web browser you are using is IE 6, this way allows any version of IE 6 to be picked up.

I’m sure there is a clearer way to do this so please feel free to improve but this certainly works.


$(document).ready(function() {

ie6catch = $.browser.msie + $.browser.version;
if (ie6catch.indexOf("true6") == -1) {
alert("This is not Internet Explorer 6");
}
});

Buzz it!
You can leave a response, or trackback from your own site.
Tags: ,
blog comments powered by Disqus
Data Recovery Software