I have a textarea with 5 lines. I want to show only one line and on focus it should show remaining 4 lines.
You can try something like this:
$(document).ready(function(){
$('#moo').focus(function(){
$(this).attr('rows', '4');
});
});
where moo is your textarea.