title: Clear Textinput text and hide clearBtn
body: <p>I have a Textinput field (search bar/box) from JQuery Mobile.</p>
  
  <p>I'm wanting to know whether there's any way (via a function) to: </p>
  
  <ol>
  <li>Clear the text value</li>
  <li>Hide the "X" or clear button (An auto-generated JQuery Mobile button inside the search bar, not the one under the search bar)</li>
  <li>Remove focus from the search bar (Textinput)</li>
  </ol>
  
  <p>I've tried using <code>$("#topSearch").val("")</code>, but this doesn't meet the second criteria. I've also tried <code>$(".ui-input-clear").click()</code> and <code>$("#topSearch").blur()</code>, but this breaks my program in an unusual way, most likely linked to a way that I populate the lists. I've also tried manually using <code>$(".ui-input-clear").hide()</code> or <code>.toggle()</code>, but JQuery Mobile seems to handle it differently (as it won't reappear).</p>
  
  <p>There must be a proper way since JQuery Mobile already does it - when you hit enter on the textinput box the text will clear, the "X" gone and the focus removed.</p>
  
  <p>Either a suggestion how to do it or how to wade through JQuery Mobile's code to find how they do it would be awesome, I've tried the latter with no luck.</p>
  
  <p>Here's a(n updated) fiddle for people to play around in: <a href="http://jsfiddle.net/pWQjZ/1/" rel="nofollow">http://jsfiddle.net/pWQjZ/1/</a><br>
  Not entirely sure how helpful it'll be.</p>
  
  <p>Another edit: To specify, this function has to be called via a function not related to the <code>.ui-input-clear</code> "X" button. The search bar gets cleared by a different function when something else is clicked - rather than the "X" (which already works).</p>