How to set the cursor position at the end of a string in a text field using jQuery? <p>I am using jQuery 1.6 and I have a text field for which I would like the cursor to be positioned at the end of the string\text after the field receives focus. Is there a trivial or easy to do this?</p> <p>At this time I am using the following code:</p> <pre><code>$jQ('#css_id_value').focus(function(){ this.select(); }); $jQ('css_id_value').focus(); </code></pre>