I have an input text box that is data bound to an mvvm
value which I default string of "RFQ". When the user tabs into the textbox I want the cursor to be at the end of the string. Current behavior has the string highlighted. I downloaded a jQuery
library (jquery-caret.js) which has a method called .caretToEnd() and it works very well if I use it in the Document Ready like this:
$("#txtRfq").caretToEnd();
But I want to use it like this:
$("#txtRfq").focus(function () {
$("#txtRfq").caretToEnd();
});
But when I tab into the text box with this code loaded the entire string "RFQ" is highlighted. What am I missing here?