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(); 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
Archived
This topic is now archived and is closed to further replies.