Tab to beginning of text input
<p>I have a login form:</p>

<pre><code>&lt;form&gt;
    &lt;div class="username"&gt;
        &lt;label for="username"&gt;Email&lt;/label&gt;&lt;br /&gt;
        &lt;input type="text" class="field" value="Enter your email" name="email" id="id_email"&gt;
    &lt;/div&gt;
    &lt;div class="password"&gt;
        &lt;label for="password"&gt;Password&lt;/label&gt;&lt;br /&gt;
        &lt;input type="password" class="field" name="password" id="id_password"&gt;
    &lt;/div&gt;
&lt;/form&gt;
</code></pre>

<p>I want to make it such that when a user tabs from one field to another it sets the selection at the beginning of the field, instead of highlighting the entire field's text. An example can be seen on the login form here: <a href="https://squareup.com/" rel="nofollow">https://squareup.com/</a>.</p>

<p>I have a function that sets the cursor at the beginning of the text input, <code>setCursorAtBeginning</code>, how would I accomplish the above using js or jQuery (preferable, if it can be done in it)?</p>
