Skip to content

Instantly share code, notes, and snippets.

@AMKohn
AMKohn / post.md
Last active November 18, 2024 11:38
How to Write a 12 Essay in Just 10 Days - by AcademicHacker
@AMKohn
AMKohn / autosize.js
Created July 4, 2014 18:15
Textarea autosizer modified from Shog9's answer on SO: http://stackoverflow.com/a/7875/900747
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,