SO Help: jQuery cursor over Textarea Corner
by AJIEKCEU
HTML
<textarea></textarea>
CSS
textarea { margin: 1em; outline: none; text-align: justify;
overflow: hidden; resize: none;
}
JavaScript
$(function() {
// changes mouse cursor when highlighting loawer right of box
$("textarea").keyup(function(e) {
// this if statement checks to see if backspace or delete was pressed, if so, it resets the height of the box so it can be resized properly
if (e.which == 8 || e.which == 46) {
$(this).height(parseFloat($(this).css("min-height")) != 0 ? parseFloat($(this).css("min-height")) : parseFloat($(this).css("font-size")));
}
// the following will help the text expand as typing takes place
while($(this).outerHeight() < this.scrollHeight + parseFloat($(this).css("borderTopWidth")) + parseFloat($(this).css("borderBottomWidth"))) {
$(this).height($(this).height()+1);
};
});
});