title: jQuery select and deselect textbox text
body: <p>I want functionality like on the focus event of text box i want to select the text of text box and on click of textbox i want to check if text in the textbox is selected then deselect it other wise select.</p>
  
  <p>for this i have added code like:</p>
  
  <pre><code>$('input').focus(function(){
    $(this).select();
  });
  </code></pre>
  
  <p>what code i should add on click event so that it can fulfill the requirment</p>
  
  <p>Thanks &amp; Regards</p>
  
  <p>Munish</p>