Skip to content

detalhar/dcounts-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dCounts-js Build Status npm version install size

Tiny count characters with no dependencies

Example

How to use:

Installation

Using npm: npm install dcounts-js --save

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

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

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>

LICENSE

© MIT License