Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graciano/char-counter
Char counter is a jquery simple plugin, where you chose your textarea/text-input with a character limit in it. Then, you create a span near your text input and it will be the warning for the user when it reaches the character limit.
https://github.com/graciano/char-counter
Last synced: 25 days ago
JSON representation
Char counter is a jquery simple plugin, where you chose your textarea/text-input with a character limit in it. Then, you create a span near your text input and it will be the warning for the user when it reaches the character limit.
- Host: GitHub
- URL: https://github.com/graciano/char-counter
- Owner: graciano
- License: mit
- Created: 2014-02-03T19:23:25.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-16T03:43:02.000Z (over 10 years ago)
- Last Synced: 2024-10-28T05:29:51.863Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 348 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
char-counter
============Char counter is a jquery simple plugin, where you chosse your textarea/text-input with a character limit in it. Then, you create a span near your text input and it will be the warning for the user when it reaches the character limit.
## How to use
$("#the-field-with-char-limit").charCounter({seletorWarn: "#the-span-for-warn-char-limit"});
Within the object you may pass as argument the optional parameters:
* `maximum`: int value, the maximum allowed in your `#the-field-with-char-limit`. Default is 140.
* `warnText`: string value to display in your `#the-span-for-warn-char-limit`. Default is a empty string.
For more, see the example.html file.| Possible future implementations:|
|--------------------------------------------------------------|
| use another criterion for the color of the text span|