Reputation: 5315
i have a problem regarding the textbox. i have done the textbox auto expandable but when i insert the text first time then the textbox shrink in size from their original size.but my requirement is that when my text is exceeding the text box length then it auto expand. my code is
<script type="text/javascript">
$(document).ready(function() {
$('.txtStyle').autogrow();
});
</script>
pls somebody suggest how ot is possible
Upvotes: 1
Views: 204
Reputation: 65264
textbox don't autogrow... because it is not capable of multi lines... use textarea instead...
Upvotes: 0
Reputation: 39763
Try adding a minHeight to your autogrow:
$(document).ready (function() {
$('.txtStyle').autogrow({
minHeight: 20,
lineHeight: 12
});
})
Upvotes: 1