jQuery Character Counter
A jQuery based character counter for <input> and <textarea> HTML tags.
What is this?
This simple plugin allows you to add a character counter to any <input> or <textarea> tag on your web-site with jQuery.
Installation
Just add the "charCounter.js" or "charCounter.min.js" to your web-page through the <script> tag.
How do I use it?
Easy.
$(element).charCounter({ options });
That's it.
Options
customClass
Default: none. Allows you to customize your character counter with CSS. You can style it like a <p> HTML element.
//CSS
.style-for-counter{color: 'red'; font-size: 24pt;}
//jQuery
$(element).charCounter({ customClass: "style-for-counter" });
Divider
Default: 'slash'. Accepts: 'slash', 'dash' and 'bar. Changes character counter divider symbol ("/", "-" or "|")
fontSize
Default: '1rem'. Changes font size for the character counter.
This plugin and its source code are free to use.