Text limiter for form fields 0.1.1
February 13, 2008 - 4:37pm — vsync
Download: textlimit.js_2.txt
Size: 1.38 KB
md5_file hash: 5111928a949647ac2d7228fd8d88bf83
First released: February 13, 2008 - 4:37pm
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>