jQuery plugin to manipulating cursor inside text and textarea fields
Set cursor at the begining in text field.
$('textarea').setAtTheBegin().focus();
Set cursor at the end of text field.
$('textarea').setAtTheEnd().focus();
Select text in user defined range. If range is incorrect throw exception.
$('textarea').setRange(13, 17).focus();
Set cursor on the position.
$('textarea').setAtThePosition(13).focus();