Limit

Limit is a plugin for the javascript framework Jquery that limits the number of characters that can be entered in a textarea or input field. The plugin can also report the number of characters left before the user reaches the length limit.

How to use Limit

To use the full power of Limit you need two html elements; one textarea or input field and an element to show amount of characters left.

  1. You have <span id="charsLeft"></span> chars left.
  2. <textarea id="myTextarea"></textarea>
  3. <script type="text/javascript">
  4.     $('#myTextarea').limit('140','#charsLeft');
  5. </script>

If you don’t want to show the amount of characters left you can do like this.

  1.     $('#myTextarea').limit('140');
Change log
VersionChanges
1.2Optimized timed function and fixed an issue with flickering text

3 days ago

Twitter Bootstrap 2.0 is here. By nerds, for nerds. Cross everything. http://t.co/J4cFxGlb A neat looking front-end toolkit.

9 days ago

Looking for a solid way to do application versioning? Look no further. http://t.co/OMYJ2xzF Semantic Versioning guidelines are nifty!

15 days ago

On Amazon: Bad reviews are better for product sales than no reviews. (via @ronnestam )

15 days ago

There are only 180k Twitter users in Sweden, but ~75% of Sweden’s journalists use Twitter. (via @ronnestam )