I am trying to find the current caret position (the blinking |) in x and y coordinates. Does anyone have a way of doing this? I really don't know where to get started.
I know this is possible in javascript, as there is a glitchy jQuery plugin for it, but I want to do it without jQuery.
More specifically, I am interested in mimicking the way Google Instant displays the #1 selection as grey text. I plan on doing this for both textfields and textareas by retrieving the caret position (like I mentioned above), then placing the text using absolute positioning. If someone has a better way to do it, let me know.
Thanks!