kuwabarahiroshi/jquery-autogrow-textarea — pull request #3 by ximi (2012-10-07 05:57:16+00:00)
Title: Refactor/Rewrite of plugin code

So, I took some time this weekend and rewrote/refactored your original plugin with 2 goals in mind:
* Adhere more to the jQuery Plugin & Authoring Guidelines (http://docs.jquery.com/Plugins/Authoring)
* Take a more object oriented approach (allowing things such as public methods), rather than the functional approach you took before.

The way the plugin works and the core functionality are still your original code, it's basically just packaged differently.

I figure I would make a pull request as I do feel there are considerable improvements here, but I would totally understand if this is a too strong alteration of your original plugin code to accept this pull request.

Here is a list of the most important changes:
* added a autoGrowTextArea method to jQuery (not jQuery.fn) that is used as prototype whenever the plugin is called on an element
* added public and private methods on the autoGrowTextArea method. This way certain aspects of the plugin can be controlled from outside the plugin as well.
* made most variables public or private global variables with autoGrowTextArea, this way we don't need to pass them from function to function, but only have to update them as necessary.
* added public enable/disable/reinit/destory methods. Made grow function a public method
* Use namespace for events
* Let users initiate public methods by passing them as parameter in the autoGrowTextArea function
* Increased grow interval time to improve performance
* Added min/max height options
* Added index.html demo page
* Added minified version (YUI! compressor)
* Some basic error messages
* Updated readme with instructions and tested browsers

Please take your time to review the changes and I would be happy if you would accept the pull request or just some feedback.