jQuery: The Write Less, Do More JavaScript Library

Releases for Text limiter for form fields

Text limiter for form fields 0.1.1

Download: textlimit.js_2.txt
Size: 1.38 KB
md5_file hash: 5111928a949647ac2d7228fd8d88bf83
First released: February 13, 2008 - 4:37pm
  • Counts down the number of characters left. (via thelimit)
  • Prevent user from typing more than allowed number of chars.
  • Trims the text if string is too long, 2 modes: char by char, and at once. (via speed = -1 for "at once" trim)

html example:

<script>
  jQuery("textarea").textlimit('span.counter',20);
</script>
<form>
  <span class="counter"></span>
  <textarea cols="40" rows="10"></textarea>
</form>

Text limiter for form fields 0.0.1

Download: textlimit.js_1.txt
Size: 0 bytes
md5_file hash: d41d8cd98f00b204e9800998ecf8427e
First released: February 13, 2008 - 4:30pm

I've made a small correction to the code, which allowed it to be applied on multiple form elements. enjoy!

Text limiter for form fields 0.1.0

Download: textlimit.js_0.txt
Size: 1.38 KB
md5_file hash: e6688d2ba5d847cf95eeec061db2109e
First released: October 25, 2007 - 4:22am
Last updated: October 25, 2007 - 4:25am
  • Counts down the number of characters left. (via thelimit)
  • Prevent user from typing more than allowed number of chars.
  • Trims the text if string is too long, 2 modes: char by char, and at once. (via speed = -1 for "at once" trim)

html example:

<script>
  jQuery("textarea").textlimit('span.counter',20);
</script>
<form>
  <span class="counter"></span>
  <textarea cols="40" rows="10"></textarea>
</form>