March 26 2017

Jquery set focus on last character in input text box

Tagged Under :

Normally using Jquery or Javascript to set focus on input box it will point to beginning of the text box. But if you want it point to last character in input text box. you may need write a Jquery class to do.

Below is the Jquery function:
    $.fn.focusTextToEnd = function(){
        var $thisVal = this.val();
        return this;

You may easy to use the function like below

Make a Comment

You must be logged in to post a comment.