Simple Character Countdown And Limit Plugin - Countdown-char

File Size: 6.57 KB
Views Total: 1223
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Simple Character Countdown And Limit Plugin - Countdown-char

Countdown-char is a super tiny jQuery plugin that adds a simple remaining character counter to existing text fields (textareas and input fields). In addition, the plugin also has the ability to limit the amount of characters to be typed into the text fields.

How to use it:

1. Load jQuery library and the jQuery Countdown-char plugin' script at the bottom of the html page.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="js/counter.js"></script>

2. Use the maxlength attribute to specify the maximum amount of characters allowed for the text fields.

<textarea maxlength="150"></textarea>
<input maxlength="50">

3. Call the countChar() function and the plugin will do the rest.

$('textarea').countChar();

This awesome jQuery plugin is developed by stergiosm. For more Advanced Usages, please check the demo page or visit the official website.