moo-charCounter v1.0

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.



Details

Author
Adrian Statescu
Current version
v1.0
GitHub
thinkphp/moo-charCounter
Downloads
70
Category
Utilities
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_: Core/MooTools
  • core/1.6.0: *

How to use

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
0 0

Discuss

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