A MooTools Plugin provides a countdown of text in an input field. Inspired by the way Twitter counts down the ramaining characters in a tweet.
Include the latest version MooTools Framework, then .js into the page:
<script src="https://ajax.googleapis.com/ajax/libs/mootools/1.5.2/mootools.min.js"></script> <script type="text/javascript" src="moo-charCounter-min.js"></script> <script type="text/javascript" src="MooTools-More-1.5.2.js"></script> window.addEvent('domready', function() { new charCounter({ elem: 'myCounter', count: 140, target: 'myTextarea', warnAt: 20, alertAt: 10, stopAtLimit: true, description: '' }) new charCounter({ elem: 'myCounter2', count: 50, target: 'myTextarea2', warnAt: 20, alertAt: 10, stopAtLimit: true, description: '' }) }); #HTML
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus