Skip to content

JQuery plugin for manipulate caret position in inputs, textareas or content editables elements

License

Notifications You must be signed in to change notification settings

alt-j/jquery.caret

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caret Manipulation Plugin

JQuery.Caret is JQuery plugin, which provide usefull interface to mainpulate caret position in any inputs, textareas or content ediatables elements.

Get position of caret:

var element = $('div[contenteditable]');
// Return current caret position.
element.caret();

Set position of caret:

var element = $('div[contenteditable]');
element.caret(2);
// If negative, it is treated as sourceLength + position
// where sourceLength is the length of the string.
element.caret(-1);

Support or Contact

Having trouble with Jquery.Caret? Contact [email protected] and we’ll help you sort it out.

About

JQuery plugin for manipulate caret position in inputs, textareas or content editables elements

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published