jQuery code to detect the browser

I amĀ Using below jQuery code to detect the browser. It works well for IE, mozilla, Safari and opera browser /* ===== Firefox ===== */ // Select Firefox if (jQuery.browser.mozilla) { // do sth. } // Select Firefox 1.5.x to 2.x if (jQuery.browser.mozilla && jQuery.browser.version.substr(0, 3) == ‘1.8’) { // do sth. } // Select Firefox […]