This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
/** | |
* jQuery plugin that places cursor at the end of text | |
* SEE: http://stackoverflow.com/questions/4609405/set-focus-after-last-character-in-text-box | |
* @param {Node} The input element | |
* @return {Node} The input element | |
* | |
*/ | |
$.fn.focusTextToEnd = function () { | |
this.focus(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Places cursor at the end of text | |
* (c) 2019 James Perrin, MIT License, https://www.countrydawgg.com | |
* SEE: http://stackoverflow.com/questions/4609405/set-focus-after-last-character-in-text-box | |
* @param {Node} The input element | |
* @return {Node} The input element | |
*/ | |
HTMLInputElement.prototype.focusTextToEnd = function () { | |
this.focus(); | |
const thisVal = this.value; |
NewerOlder