Prajwalit![]()
A small YUI 3 plugin which adjusts height of textarea (rather than adding scroll bar) as user goes on writing in it. It calculates number of rows taken by the input and height of one row and adjusts height of autocomplete accordingly.
You need a <textarea> with (if you want) rows="1". Then you can just plug the TextareaAutoheight plugin.
<script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script>YUI ({
gallery: "gallery-2012.05.09-20-27"
}).use ("gallery-textarea-autoheight", function (Y) {
Y.one ("textarea").plug (Y.TextareaAutoheight);
});
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info