jQuery plugin to manipulate the caret's position in a text box
JavaScript HTML
Latest commit 8cd0910 Mar 1, 2016 @accursoft ignore empty collections
return nothing for get when cannot obtain a position
always return this for set

adapted from obecker@d33233c
Permalink
Failed to load latest commit information.
bower.json author homepage Jan 27, 2016
jquery.caret.js ignore empty collections Mar 1, 2016
license.txt license BSD3 May 3, 2012
readme.md readme Aug 12, 2013
test.html fixes #2 IE 7 and 8 support Jul 17, 2014

readme.md

jQuery Caret

  • get the caret's position: pos = $(textarea).caret()
  • set the caret's position: $(textarea).caret(pos)
  • set the caret's position to the end: $(textarea).caret(-1)

Return value: the current/new caret position