There are a couple of reasons why you might reconsider implementing such a function.
1. Performance
mouseover
triggers a lot of events in a very short amount of time in which you'd have to recalculate the caret position. On low-end devices (such as netbooks or smartphones) this can very quickly become very laggy.
2. Usability
In case of laptops and netbooks it can easily happen that you accidentally touch your touchpad and therefor accidentally move the cursor to a whole new position which can be really annoying.
3. Support
Consider that most touch computers such as tablets and smartphones won't be able to use your function.
4. Usage
I can't think of any usage case where this function could be benefitial. The only thing you win is one less click on the user side. Consider that the user already moved the cursor to the specific position that he wants to edit. One more finger press down doesn't take any effort at all.
That said, if you still decide to go for it for whatever reason you got, what you have to do is get the line height of every row of the textarea field. Use a mono font where each character has the same width. Get the height and width of the textarea field. Get the hidden part of the textarea field when the scroll bar is not at the top. And lastly get the cursor position inside the textarea. From all that data you may be able to calculate the index of the string and then use the jquery function you linked where both arguments are the same $("textarea").selectRange(pos, pos);