NOTE: This is a copy of AcademicHacker's post on College Confidential, which is currently unavailable. I have edited it for clarity, but it is otherwise unchanged.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var autosize = function(e) { | |
var area = e.currentTarget, | |
ch = area.clientHeight, // These should be cached as much as possible since this is triggered on keyup | |
sh = area.scrollHeight; | |
if (ch == sh) { | |
area.style.height = "30px"; | |
// Recache them | |
var ch = area.clientHeight, |