/caret

DEPRECATED in favor of

Primary LanguageJavaScriptBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

jQuery Caret NPM version

This is a fork of jQuery Caret with few fixes published to npm for our own convenience. Feel free to use though we probably aren't going to support it much.

API

  • 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