edgarjs / bigger-textarea

Bigs your text area as the value of it reachs a limit

This URL has Read+Write access

name age message
file README.rdoc Sat Oct 10 16:29:08 -0700 2009 doc change [edgarjs]
directory lib/ Fri Oct 16 21:48:26 -0700 2009 invoking the event by default [edgarjs]
README.rdoc

biggerTextarea

jQuery plugin by Edgar J. Suárez

Bigs your text area as the value of it reachs a limit

URL

github.com/edgarjs/bigger-textarea mirror: codaset.com/edgarjs/biggertextarea

Options

  • cssFilter string - Limit the textareas that you want to be resized.
  • limit integer - The minimum of characters allowed before resizing bigger.
  • sizeStep integer - The size in pixels that you want the textarea to increment.
  • breakSize integer - The number of chars that a line break may be valid for. In other words: How many chars does a row in your textarea have?
  • onBeforeBigger function(newHeight, textarea, keyupEvent) - Callback for just before the textarea makes bigger.
  • onAfterBigger function(newHeight, textarea, keyupEvent) - Callback for just after the textarea makes bigger.
  • onBeforeSmaller function(newHeight, textarea, keyupEvent) - Callback for just before the textarea makes smaller.
  • onAfterSmaller function(newHeight, textarea, keyupEvent) - Callback for just after the textarea makes smaller.

Examples:

  $.biggerTextarea({
      limit: 500,
      sizeStep: 150,
      onBeforeBigger: function(h) {
          console.log('going bigger to: ' +  h);
      },
      onAfterBigger: function(h) {
          console.log('gone bigger to: ' +  h);
      },
      onBeforeSmaller: function(h) {
          console.log('going smaller to: ' +  h);
      },
      onAfterSmaller: function(h) {
          console.log('gone smaller to: ' +  h);
      }
  });

License

Released under MIT license.

  Copyright (c) 2009 Edgar J. Suárez Heredia

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.