title: How to prevent the double-click select text in Javascript
body: <p>Say I have an <code>ul</code> (<code>li</code>) list in the page:</p>
  
  <pre><code>&lt;ul&gt;
   &lt;li&gt;xxx&lt;li&gt;
   &lt;li&gt;xxx&lt;li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>The element <code>li</code> are clickable and double-clickable, they are attached with these events, and I <code>return false</code> in both of them.</p>
  
  <pre><code>$('ul li').on('click',function(){
      //do what I want
      return false;
  }).on('dblclick',function(){
      //do what I want
      return false;
  });
  </code></pre>
  
  <p>But when the user double-clicks the element, the text inside the <code>li</code> will be selected. How can this be prevented?</p>
  
  <blockquote>
    <p><strong>Update:</strong></p>
  </blockquote>
  
  <p>Solved now,I use the following code with the css selector by <strong>NiftyDude</strong>:</p>
  
  <pre><code>$('ul li').on('click',function(){
      //do what I want
      return false;
  }).....on('dragstart',function(){return false;}).on('selectstart',function(){return false;});
  </code></pre>