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.
Based on United States, Jacob Frazier is a skilled JavaScript developer with over 8 years of experience. He is passionate about change and trying new things, both professionally and personally. He loves startups and is extremely proactive.
If you are in a financial crisis , or need to start a new business…
Hormonal balance plays a pivotal role in overall well-being, influencing various aspects of health, from…
Dog walking is an excellent way to maintain your furry friend's camaraderie and provides many…
Introduction Businesses understand the diverse requirements of mobile applications, which provide a competitive advantage. There…
The Internet of Things (IoT) has recently changed the world. It links gadgets together and…
NFTs, or Non-Fungible Tokens, are revolutionizing the digital economy. These unique digital assets, authenticated through…
View Comments
Yes it is.