charCounter.js

This is MooTools Plugin provides a countdown of text in an input field. Inspired by the way Twitter counts down the ramaining characters in a tweet.

0 0


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: ''        
   })  

});