How do you set the cursor position in a text field using jQuery? I\'ve got a text field with content, and I want the users cursor to be positioned at a certain offset when
Set the focus before you have inserted the text into the textarea thus?
$("#comments").focus(); $("#comments").val(comments);