title: How to find li whose text starts with a particular string?
body: <p>I have a function to get the <code>&lt;li&gt;</code> tag at the top that contains the <code>key</code> specified to it, anywhere in the text.</p>
  
  <p>But I want to have the <code>&lt;li&gt;</code> that starts with the key specified to it.
  Here is the code:</p>
  
  <pre><code>function displaySearchResult(key){
     var li=$('.listcontainer ul li:contains('+key+')');
     li.parent().prepend(li);
  }
  </code></pre>
  
  <p>So how to get the <code>&lt;li&gt;</code> tag whose text starts with the specified <code>key</code>?</p>