Autosize is a small jQuery plugin that allow textarea autosize making height dynamically so that it expands as based on visitor input.
You can implement textarea autosize by calling the .autosize() method on any textarea element.
$('textarea').autosize();
For implementation autosize in your website you need to follow below steps:
<script type='text/javascript' src='jquery.js'></script> <script type='text/javascript' src='jquery.autosize.js'></script>
<form> <textarea id="txtID" name="txtID"></textarea> </form>
<script type="text/javascript"> $(document).ready(function() { $('textarea').autosize(); }); </script>
Read Also: 10 best jQuery Notification plugin
When calling autosize, it adds a hidden textarea element to you document that mirrors the original textarea’s input. Mirrored textarea is used to calculate the size what the actual textarea should be. Then the mirrored textarea copies the actual textarea’s styles that relate to text formatting.
In a world where digital presence is paramount, the question isn't whether you should do…
Over the years, people have experimented with various methods to maintain healthy and beautiful hair.…
Your brand more than developing an attractive and creative logo and infectious motto. It's the…
Introduction Are you someone who has suffered from a personal injury and want to file…
Operating from home has emerged as one of the most popular ways of doing jobs…
If the consequences of our society’s ever-growing debt are what worries you, then it is…
View Comments
Yes it is.