The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
See 1 more by this user. Created: 05/4/12
Last CDN Push: 05/9/12
Build Tag: gallery-2012.05.09-20-27
Project: YUI 3
License: YUI BSD
YUI Version: 3.5.1
Free for use.
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);
});
All code on this site is licensed under the BSD License unless stated otherwise.