I'm having long loading times when using a lot of textareas.
<?php
foreach($hold as $value){
$card_key = $value['card_key'];
$card_one = $value['card_one'];
$card_two = $value['card_two'];
$card_three = $value['card_three'];
echo '<li class="row_'.$card_key.'" value="'.$card_key.'">
<p>'.$i.'.</p>
<button type="button" value="'.$card_key.'" tabindex="-1"></button>
<div class="edit_one">
<textarea class="text1" maxlength="1000">'.$card_one.'</textarea>
</div>
<div class="edit_two">
<textarea class="text2" maxlength="1000">'.$card_two.'</textarea>
<textarea class="text3" maxlength="1000">'.$card_three .'</textarea>
</div>
<div style="clear:both;"></div>';
echo '</li>';
$i++;
}
?>
<script type="text/javascript" src="../../scripts/jquery.elastic.source.js"></script>
<script type="text/javascript">
$('.edit_main textarea').elastic();
</script>
When $hold contains 1-10 it doesn't take that long to load, but when it has 50 or so it takes 8+ seconds to load.
Is there a faster way to load multiple textareas? Should I instead use AJAX to load them in one at a time so it appears seamless?