Detect Internet Explorer using jQuery

jQuery-logo
In my last post you have seen how to detect Internet Explorer 6 using Javascript. If you love jQuery like I do then here is the simple snippet that you can use to Internet Explorer 6 using jQuery.

jQuery.each(jQuery.browser, function(i, val) {
if(i=="msie" && jQuery.browser.version.substr(0,1)=="6")
alert("Do stuff for IE 6")
});

Related posts:

  1. Detect Internet Explorer 6 using JavaScript
  2. The Simplest Way to Create a Cross Browser Compatiable Website
  3. How to create Rounded Corners using CSS
  4. The Internet – Misconceptions Explained
  5. Creating an AJAX Powered Pagination in WordPress


The author is a small business owner himself specialising in Web Development. He runs Insight Studios which offers specialized Web Development, SEO Services and PPC Management for Small Business and SME thus ensuring growth and prosperity using the power of social media.

Share This Post

Related Articles

2 Responses to “Detect Internet Explorer using jQuery”

  1. [...] You can also detect Internet Explorer using jQuery [...]

  2. jQueryGlobe says:

    You don`t need to use “each”, so better would be –
    if ($.browser.msie && $.browser.version.substr(0,1) == 6) {

    }

    Btw, latest version of jQuery (1.3.2) has issue with jQuery.browser.version detection, it reports wrong IE versions on some corrupted IE userAgent strings – http://blog.orite.com.au/tag/ie8/

Leave a Reply

© 2012 MyGeekPal. All rights reserved. Site Admin · Entries RSS · Comments RSS
Designed by Insight Studios