Skip to content
you can get the cursor caret offset position(i.e.x,y) by this plugin, even included index getter. http://bevis.me/jquery-caret-position-getter.html
JavaScript
Find file
New pull request
Latest commit f040a13 @beviz Merge pull request #8 from dante2008/indentation
Fix indentation inconsistency
Failed to load latest commit information.
README.md Update README
demo.html first commit
jquery.caretposition.js Fix indentation inconsistency
jquery.js first commit

README.md

Usage

var pos = $('textarea').getCaretPosition();

// now you can use left, top(they are relative position)

$my_tip.css({
    left: this.offsetLeft + pos.left,
    top: this.offsetTop + pos.top
});
Something went wrong with that request. Please try again.