开发者

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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜