changeset 1:af19f44024d3

scroll to bottom
author k0s <k0scist@gmail.com>
date Fri, 01 Jan 2010 20:01:02 -0500
parents 8af3412e907a
children df84e61ae1e4
files wordstream/templates/index.html
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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()});
+}
 });
 }