title: I want to put cursor in beginning of text-box onfocus
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1865563/set-cursor-at-a-length-of-14-onfocus-of-a-textbox">Set cursor at a length of 14 onfocus of a textbox</a>  </p>
  </blockquote>
  
  
  
  <p>I am able to do that in firefox and IE. But for some reason its not working in Chrome and Safari :(</p>
  
  <p>I am simply using below line onfocus</p>
  
  <pre><code>$('input:text').focus(
  function(){
        document.getElementById('id').setSelectionRange(0, 0);
      });
  </code></pre>
  
  <p>Can someone please tell me how to do similar thing in Chrome and safari?</p>