# HG changeset patch # User k0s # Date 1262394062 18000 # Node ID af19f44024d3f85dde5104779976fdc30562879e # Parent 8af3412e907a955e3c0218c3d3533e76be41f407 scroll to bottom diff -r 8af3412e907a -r af19f44024d3 wordstream/templates/index.html --- a/wordstream/templates/index.html Fri Jan 01 19:35:32 2010 -0500 +++ b/wordstream/templates/index.html Fri Jan 01 20:01:02 2010 -0500 @@ -22,7 +22,11 @@ if (lastword.length) { $.get(lastword, function(data) { -if (data.length) { $('#stream').val(text + data + '\n'); } +if (data.length) { +var t = $('#stream'); +t.val(text + data + '\n'); +$('#stream').animate({scrollTop: t.height()}); +} }); }