2
Ola would like to do a method where the user clicks on the input and always direct to the last character typed, any hint?
2
Ola would like to do a method where the user clicks on the input and always direct to the last character typed, any hint?
0
Hello,
Based on this stackEN question, you can do as the code below.
https://stackoverflow.com/questions/4609405/set-focus-after-last-character-in-text-box
(function($){
$.fn.setCursorToTextEnd = function() {
var $initialVal = this.val();
this.val($initialVal);
};
})(jQuery);
$('#meuTXT').setCursorToTextEnd();
Browser other questions tagged javascript html
You are not signed in. Login or sign up in order to post.
You want to do this when the user selects input (in the event
focus
?)– Sergio