Set maximum characters and display remaining.
npm i altai_count
yarn add altai_count
Add this line to your application.js
//= require altai_count/dist/altai_count
Set by using the following:
$(".altai-count").altaiCount();
Settings:
## Define max character set.
maxCharacters: 140
## Print state
klass: ".altai-characters"
## State message
tagline: "characters remaining."
## Print log messages in your developer console.
debug: true or false
The gem is available as open source under the terms of the MIT License.