Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

maxChar


Add maximum character limits with status message "N remaining" to any input or textarea element. You can also set your own status messages along with many other options including animating back and forth between label and status message.

Starts and stops the counter update depending on user focus/blur. This approach properly handles the problem of when the user pastes text into the input/textarea element via the right click menu.

Features

  • Drop dead simple with sensible defaults or completely customizable with overrides
  • Have plural and singular forms of message
  • Easily work with multiple form fields
  • Properly handle user pasting text via right click menu

Example Usage

$(document).ready(function(){
     // Pass HTML element id and character limit.
     $('#message').maxChar(50);
});

Parameters

  • debug - Specify whether to send message updates to the Firebug console. Default is false.
  • indicator - Specify alternate indicator element by id. Default is indicator created dynamically.
  • label - Specify a default label displayed when input element is not in focus. Default is blank.
  • pluralMessage - Set the plural form of the remaining count message. Default is ' remaining'.
  • rate - Set the update rate in milliseconds. Default is 200.
  • singularMessage - Set the singular form of the remaining count message. Default is ' remaining'.
  • spaceBeforeMessage - Set spacing in front of (to the left of) the indicator message. Default is ' '.
  • truncate - Truncate submitted value down to limit on form submit. Default is true.

Downloads



5
Your rating: None Average: 5 (1 vote)