I have an JS textarea autogrow and textarea more than 1. In example the textarea have an ID 1,2,3,4….
Here it’s the JS
<script type="text/javascript">
$(document).ready(function(){
$("#ctextarea").autoGrow();
});
</script>
Here it’s the textarea :
<textarea name="comment" class="comment" maxlength="200" id="ctextarea<?php echo $msg_id;?>"></textarea>
And now how can I set that, if I go to textarea 2,3,4… the textarea will autogrow ?
Thanks for any help!
give all the textarea, same class… and call a class selector in jquery
HTML
JQUERY
OR
you can use a name selector …