title: How can I detect browser type using jQuery?
body: <p>I want to detect if the user is using IE and Firefox but I cannot find the script.</p>
  
  <p>I have code as below:</p>
  
  <pre><code>$(document).ready(function(e) {
      $.browser.chrome = /chrom(e|ium)/.test(navigator.userAgent.toLowerCase()); 
      if($.browser.chrome){
          alert(1);
               //this work well
      }
              else if(//the browser is IE){alert(2);}
              else if(//the browser is Firefox){alert(3);}
  
     //The problem is that I don't know how to write a script for IE and FireFox browser for chrome is work fine
   )};
  </code></pre>