I need to add a static text to textarea while typing.
var text= " my text";
$("#myInput").keydown(function() {
$("#myInput").val(this.value + text);
});
The above code adds " my text" to textarea, and after that if I continue typing, it starts to type after "text" word. I need my cursor stay always before " my text".