jquery character caculator is an easy-to-use and developer plugin that provides instant character count statistics for text fields like textarea and input.
Features:
A plugin to show the number while writing or pasting.
- Count spaces as a letter or not
- Reducing character
- Use the callback function
How to make use of it:
1. Create an empty container to show the character depends on statistics next to your text field.
<!-- Input Field --> <input id="basic" /> <!-- Textarea --> <input id="basic" /> <span id="target" class="count"></span>
2. Load the jquery-characters-caculator.js
after jQuery.
<script src="/path/to/cdn/jquery.slim.min.js"></script> <script src="/path/to/dist/js/jquery-characters-caculator.js"></script>
3. Create a primary character counter.
$('#basic').calculate(function (length, limit) { (limit > 0 ? $('#target').html(`<span>${length}</span>/${limit}`) : $('#target').html(`${length}`)); });
4. Count the variety of characters including whitespaces.
$('#basic').calculate(function (length, limit) { (limit > 0 ? $('#target').html(`<span>${length}</span>/${limit}`) : $('#target').html(`${length}`)); },{ whitespaces: false });
5. Show the maximum number of characters allowed to type.
$('#basic').calculate(function (length, limit) { (limit > 0 ? $('#target').html(`<span>${length}</span>/${limit}`) : $('#target').html(`${length}`)); },{ limit: 140 });
Character Counter Including Whitespaces, jquery characters caculator Plugin/Github, character counter with spaces, character counter without spaces, character count, character count online
See Demo And Download
Official Website(hienle2020): Click Here
This superior jQuery/javascript plugin is developed by hienle2020. For extra Advanced Usages, please go to the official website.
Be First to Comment