Float a div on a textarea?
<p><img src="http://i.stack.imgur.com/nVOKi.png" alt="enter image description here"></p>

<p>I have a div which has this list of suggestions. But i need to allocate it at the caret position of the textarea. Is this possible if yes, help me to do it.</p>

<pre><code>function findOffsetPosition(obj) {
    var posX = obj.clientLeft; var posY = obj.clientTop;
    while (obj.offsetParent) {
        if (obj == document.getElementsByTagName('body')[0]) { break }
        else {
            posX = posX + obj.offsetParent.offsetLeft;
            posY = posY + obj.offsetParent.offsetTop;
            obj = obj.offsetParent;
        }
    }
    var posArray = [posX, posY]
    return posArray;
}
</code></pre>
