moose-en-a-gant Posted February 10, 2015 Share Posted February 10, 2015 I have this input where 8 characters are already filled in and upon focus, the cursor should be flashing at the end of the last character. I found this page http://stackoverflow.com/questions/4609405/set-focus-after-last-character-in-text-box Tried to use this, any thoughts? (function($){ $.fn.setCursorToTextEnd = function() { var $initialVal = this.val(); this.val($initialVal); }; })(jQuery); $('#writer').setCursorToTextEnd(); Quote Link to comment https://forums.phpfreaks.com/topic/294494-moving-a-cursor-upon-focus-to-the-last-character/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.