Twitter Like Character Counter with Pure Javascript – VCountdown

Category: Form , Javascript | July 12, 2018
Author: pinceladasdaweb
Views Total: 1,369
Official Page: Go to website
Last Update: July 12, 2018
License: MIT

Preview:

Twitter Like Character Counter with Pure Javascript – VCountdown

Description:

VCountdown is a pure vanilla JavaScript library that displays a counter for your text field to count characters down as you seen on Twitter tweet box. It comes with a maxChars option to limit the maximum of characters allowed typing into the text field.

How to use it:

Include the vcountdown.min.js script anywhere on your html page.

<script src="vcountdown.min.js"></script>

Initialize the character counter on target text area.

VCountdown.init({
  target: '.countdown'
});

Change the maxChars option. Default to 140.

VCountdown.init({
  target: '.countdown',
  maxChars: 160
});

Changelog:

07/12/2018

  • Minor code improvements

Leave a Reply