Easy jQuery Character Counter / Limit For Text Fields - Charcounter.js

File Size: Unknown
Views Total: 1528
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Easy jQuery Character Counter / Limit For Text Fields - Charcounter.js

Just another jQuery based character counter plugin for any text field that has the ability to limit the maximum amount of characters to be typed. Supports both input fields and textareas.

How to use it:

1. Place jQuery library and the jQuery Charcounter.js script at the bottom of your html page.

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

2. Call the function on the text field to generate a default character counter inside it.

$("input").charCounter();

3. Customize / stylize the character counter with the following settings.

$("input").charCounter({
  backgroundColor: "#FFFFFF",
  position: {
    right: 10,
    top: 10
  },
  font:   {
    size: 10,
    color: "#a59c8c"
  },
  limit: 255
});

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