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.
- 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