var myTween = new Fx.Tween('comments',{ transition: 'bounce:out', duration: 1000 }); $('comments').addEvents({ focus: function(){ myTween.start('height', 200); }, blur: function(){ myTween.start('height', 50) } });
<textarea id="comments">Focus and blur me all night long</textarea>
textarea { width: 200px; height: 50px; }