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 today’s fast-paced and highly competitive marketing environment, even the most creative campaign is only…
We are NYC moving firm. Are you planning a flat move? Maybe a distance or…
Mobile devices, unlike desktops and laptops, can not be handled by dozens or hundreds of…
Augmented Reality- An immersive experience for the learners! Learning and education aren’t the same as…
On special days like birthdays and weddings, we all like to celebrate our loved ones…
A web application is different from a regular mobile or desktop application as it runs…
View Comments
Yes it is.