I have the following HTML:
<textarea class="new" id="1"></textarea>
<textarea class="new" id="2"></textarea>
As well as this CSS:
.new {
height:60px;
}
.new:focus {
height:80px;
}
When the textarea gains focus (the user clicks on or tabs to it) I want its height to be changed to 100px, but only if its value is a non-empty string. How can I achieve this?
Update::I want textarea to function like twitter
Thanks for reading