Expand textarea height when click on it.It is like twitter compose box.
jQuery animate() Method is used to expand height here.
The animate() method is used to implement custom CSS properties on click events,onfocus etc.
Syntax:
(selector).animate({styles},speed,easing,callback)
Please share your comments and feedback.Thanks.Please subscribe my updates via email.
jQuery animate() Method is used to expand height here.
The animate() method is used to implement custom CSS properties on click events,onfocus etc.
Syntax:
(selector).animate({styles},speed,easing,callback)
JQuery Function
<script>
$('textarea.height').focus(function () {
$(this).animate({ height: "5em" }, 500);
});
</script>
$('textarea.height').focus(function () {
$(this).animate({ height: "5em" }, 500);
});
</script>
HTML
<textarea class="height" rows="1" cols="40"></textarea>
No comments:
Post a Comment