Does anybody know how to move the keyboard caret in a textbox to a particular position?
For example, if a text-box (e.g. input element, not text-area) has 50 charact
function SetCaretEnd(tID) { tID += ""; if (!tID.startsWith("#")) { tID = "#" + tID; } $(tID).focus(); var t = $(tID).val(); if (t.length == 0) { return; } $(tID).val(""); $(tID).val(t); $(tID).scrollTop($(tID)[0].scrollHeight); }