title: Set cursor position at the beginning of the line
body: <p>I know his question has been answered in the site, but i have some conflict with my current code that i've used. (find it below)</p>
  
  <p>I have default value in my text filed  "<code>example.company.com</code>" and i set the focus to clear the <code>example</code> from the value.</p>
  
  <pre><code>jQuery(document).ready(function() {
  
      jQuery.fn.cleardefault = function() {
      return this.focus(function() {
          if( this.value == this.defaultValue ) {
              this.value = ".company.com";
          }
      }).blur(function() {
          if( !this.value.length ) {
              this.value = this.defaultValue;
          }
      });
  };
  jQuery(".clearit input, .clearit textarea").cleardefault();
  
  });
  </code></pre>
  
  <p>I also need to set the cursor to the beginning of the line when user clicks and the <code>example</code> disappeared, but i wasn't able to do that. I'm not very expert in jQuery, so asking here to get help.</p>
  
  <p>Thanks!</p>