🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

writeLimit.js is a small jQuery plugin used to limit the character length in a textarea element. With a custom feedback that displays the current/maximum character length.

Character-Limit

Documentation

writeLimit.js

This is a simple text input limit jQuery plugin.

How to use

Firstly, include writeLimit.js after including jQuery. Now you're ready to use it!

  • Hook the plugin to an input field / textarea
    $("#input-field").writeLimit();
  • On it's own it will not do anything, so you'll need to pass it some parameters.
    $("#input-field").writeLimit(feedback, limit, addon); // Feedback - A place where to return the current character number and maximum length. // Limit - The maximum amount of characters to be inserted in the current field. // Addon - OPTIONAL - something to be appended to feedback.
  • Example
    $("#input-field).writeLimit("#input-field-feedback", 1024, "characters");

License

MIT


You May Also Like