textbox issue regarding shrinking first time input text
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.开发者_Go百科 my code is
<script type="text/javascript">
$(document).ready(function() {
$('.txtStyle').autogrow();
});
</script>
pls somebody suggest how ot is possible
Try adding a minHeight to your autogrow:
$(document).ready (function() {
$('.txtStyle').autogrow({
minHeight: 20,
lineHeight: 12
});
})
textbox don't autogrow... because it is not capable of multi lines... use textarea instead...
精彩评论