Fields for inserting data in the form

2

Hello, I would like to make a method where the user clicks on the input and always direct to the last character typed, any tips?

    
asked by anonymous 04.10.2015 / 22:13

1 answer

0

Hello,

Based on this question of stackEN, you can do as the code below.

link

(function($){
    $.fn.setCursorToTextEnd = function() {
        var $initialVal = this.val();
        this.val($initialVal);
    };
})(jQuery);


$('#meuTXT').setCursorToTextEnd();
    
08.10.2015 / 15:02