Skip to content

Instantly share code, notes, and snippets.

@heiglandreas
Created October 20, 2016 01:44
Show Gist options
  • Save heiglandreas/d85ab29f1df05a376cbd220eef3bdcae to your computer and use it in GitHub Desktop.
Save heiglandreas/d85ab29f1df05a376cbd220eef3bdcae to your computer and use it in GitHub Desktop.
$('#comment').unbind('keyup');
$("#comment").keyup(function(e) {
var offset = this.offsetHeight - this.clientHeight;
$(this).css('height', this.scrollHeight + offset);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment