What's the best way to detect these three browsers?

Here's what I've come up with so far, but there's got to be a cleaner
solution...

$.browser.msie6 =
        ($.browser.msie
        && /MSIE 6\.0/i.test(window.navigator.userAgent)
        && !/MSIE 7\.0/i.test(window.navigator.userAgent));

        if( $.browser.msie6 && !/MSIE 8\.0/i.test
(window.navigator.userAgent)) {
            //IE 6
       else if ($.browser.msie  && (jQuery.browser.version > 6.9999)
&& (jQuery.browser.version < 7.9999) ) {
           //IE 7
        }
       else if ($.browser.msie  && (jQuery.browser.version > 7.9999) )
{
          //IE 8
        }

Reply via email to