title: Identify IE9/IE10 using jQuery
body: <p>I have a jQuery code which is working fine for Chrome/Mozilla but not IE. </p>
  
  <pre><code>if ($("html").hasClass("ie")) {
      $(function(){
          $('.green-column, .red-column, .grey-column').click(function() { 
               alert ($(this).attr("data-type"));           
          });
      });
  }
  else {
   $(function(){
          $('.green-column, .red-column, .grey-column').click(function() { 
           $("&lt;div title='Selected Task is:'&gt;" + $(this).attr("data-type") + "&lt;/div&gt;").dialog({ 
               modal: true,
               resizable: false,
               buttons: [
                  {
                     text: "OK", 
                     click: function() { $( this ).dialog( "close" ); }
                  }
               ]
           });
      });
  });
  }
  &lt;/script&gt; 
  &lt;!--[if IE 7]&gt;    &lt;html lang="en-us" class="ie"&gt; &lt;![endif]--&gt;
  &lt;!--[if IE 8]&gt;    &lt;html lang="en-us" class="ie"&gt; &lt;![endif]--&gt;
  &lt;!--[if gt IE 8]&gt;&lt;!--&gt; &lt;html lang="en-us" class="ie"&gt; &lt;!--&lt;![endif]--&gt;
  </code></pre>
  
  <p>So I plan to use an alert for IE9/IE10 but I am not able to differentiate between the browsers. Can anyone tell me how to identify IE9/IE10 in jQuery/HTML?</p>