jquery - How i do autoexpand input, not textarea? -
like http://www.jacklmoore.com/autosize/ not textarea, input. it's didn't work input.for example:
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script> <script src='jss/jquery.autosize.js'></script> <script> $(function () { $('.normal').autosize(); }); </script> <body> <textarea class='normal'></textarea> </body>
i need- input of fixed width, height changes
<input class='normal'/>
help pls
you can use contenteditable div:
<div contenteditable="true" class="normal"></div>
.normal { width: 150px; min-height: 16px; overflow: hidden; padding: 3px 3px 2px; border: 1px solid #aaa; border-radius: 2px; font-size: 11px; font-family: helvetica,arial; }
jsfiddle: http://jsfiddle.net/z4ex6/
Comments
Post a Comment