Tiny count characters with no dependencies
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>
© MIT License