Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 244 Bytes

readme.md

File metadata and controls

8 lines (6 loc) · 244 Bytes

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