Configurable Character Counter For Textarea - jQuery maxCaracter
| File Size: | 3.41 KB |
|---|---|
| Views Total: | 844 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
maxCaracter is a jQuery based character counter plugin that counts and limits the number of characters typed in the textarea element.
How to use it:
1. Include the maxCaracter.js script after including jQuery library.
<script src="https://code.jquery.com/jquery-1.12.4.min.js"
integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ"
crossorigin="anonymous">
</script>
<script src="js/maxCaracter.js"></script>
2. Call the function on the textarea element and specify the character limit (Default: 500).
<textarea id="example"> </textarea>
$("#resume").maxCaracter({
limit: 140
});
3. Set the starting value of the counter.
$("#resume").maxCaracter({
startCounter: 0
});
4. Customize the appearance of the character counter.
$("#resume").maxCaracter({
textMax: "Max",
textCaracter: "Counter",
titleColor: "#1578AD",
textColor: "#737577",
textAlign: "right",
width: this.width(),
marginLeft: this.css("margin-left")
});
This awesome jQuery plugin is developed by vhitox. For more Advanced Usages, please check the demo page or visit the official website.





