I need to position div below the text in textarea. So if I'm typing here, the div should be in the line below and so on...
any ideas how to get this text position to place div below it?
what I did just gets the div position, not the text.
var offset = $('#comment').offset();
var x_pos = offset.left;
var y_pos = offset.top;
$("#display").css({
top: x_pos,
left: y_pos
});
html:
<textarea id=comment>how to position #display always below this text? (even if I press enter)</textarea>
<div id=display></div>