dCounts.js

Tiny count characters with no dependencies

Installation

Using npm:

npm install dcounts-js --save

Manually:

Download dcounts-js.min.js from this repo and add before this closing body tag:

<script src="path/to/dcounts-js.min.js"></script>

Usage:

dcounts('selector', limit);

Where selector input or textarea is a ID and limit is a number.

Full Example

...
<input id="my_input_text" type="text" />
...
    <script src="path/to/dcounts-js.min.js"></script>

    <script>
      dcounts('my_input_text', 20); //without #
    </script>
  </body>
</html>