- Overview
- Documents
FreeChars is a jQuery Minimal characters counter Plugin for textarea/input elements. Also works as a polyfill for "maxlength" attribute.
Source: mjlescano.github.io
Jul 15, 2014 in Forms 3201 views
FreeChars is a jQuery Minimal characters counter Plugin for textarea/input elements. Also works as a polyfill for "maxlength" attribute.
Source: mjlescano.github.io
1. INCLUDE JS FILES
<!-- jQuery (1.9 or newer). --> <script type="text/javascript" src="lib/rAF.js"></script> <!-- (optional) window.requestAnimationFrame Polyfill for good performance on old browsers. --> <script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script> <!-- The plugin :D --> <script type="text/javascript" src="src/jquery.freeChars.js"></script>
2. HTML
<textarea maxlength="300" rows="10" cols="60"></textarea> <span id="count"></span>
3. JAVASCRIPT
var $count = $('#count') $('textarea').freeChars({ update: $count });
4. OPTIONS
Tagged with:
freechars
jquery plugin
minimal characters
characters counter
counter for textarea
counter for input
maxlength
counter
limit for textarea
Related Articles