Purpose: Provides a lightweight plugin for the textarea tag that dynamically resizes based on its content that has no UI glitches or quirks.
MooTools 1.3 only!
DynamicTextarea is a reusable class that can by applied to any textarea tag on a page (with any sort of CSS styling attached to it) that allows it to dynamically resize based on the content it contains.
Constructor:
new DynamicTextarea(el,options); //el: A dom node or id string. //options: an object containing key:value pairs for configuring the class. Check the source for more details on available options
In Context:
new DynamicTextarea('myInput',{
minRows:2
});
This will ensure the textarea is always at least 2 rows tall.
Opera fails with certain CSS styles, so please test Opera and disable if necessary.
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus