title: Select event for a div element
body: <p>This is my sample code. The <em>select</em> function is not working. What I'm doing wrong here. Browser chrome, OS Windows 7.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;style&gt;
    p { color:blue; }
    div { color:red; }
    &lt;/style&gt;
    &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;p&gt;
      Click and drag the mouse to select text in the inputs.
    &lt;/p&gt;
    &lt;div id="b"&gt;Some text in div element&lt;/div&gt;
  
  
    &lt;div id="a"&gt;&lt;/div&gt;
  &lt;script&gt;
      $(document).ready(function(){
            $("#b").select( function () { 
            $("#a").text("Something was selected").show().fadeOut(1000); 
          });
      });
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>