Fork me on GitHub

Char Counter

character(s) remaining

<input id="myInput" type="text" />
<span id="myCounter"></span> character(s) remaining
YUI().use(
  'aui-char-counter',
  function(Y) {
    new Y.CharCounter(
      {
        counter: '#myCounter',
        input: '#myInput',
        maxLength: 10
      }
    );
  }
);