UNPKG
@accursoft/jquery-caret
Version:
latest (1.3.7)
1.3.7
1.3.6
1.3.5
Manipulate the caret's position in a text box or content-editable element
github.com/accursoft/caret
@accursoft/jquery-caret
/
readme.md
8 lines
(6 loc)
•
244 B
Markdown
View Raw
1
2
3
4
5
6
7
8
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