I am using a contenteditable
on my page. When the user focuses the div, the height is set in js. (Needed to show buttons irreverent to the this issue) If the user types a significant amount of text, as to push multiple lines, it overflows the box and is hidden. How can I detect when additional lines are added or removed? Thanks!
HTML:
<div id="edit" contenteditable="true">I can be edited.</div>
jQuery:
$("#edit").focus(function(){
t=$(this);
t.css('height',t.height()+10);
}).blur(function(){
$(this).css('height','');
});