TextCounter.js
A jQuery plugin which provides a countdown of text in an input field.
Install / Use
/learn @commadelimited/TextCounter.jsREADME
textCounter.js
TextCounter is a jQuery plugin which provides a countdown of text in an input field. Inspired by the way Twitter counts down the remaining characters in a tweet, textCounter is a configurable jQuery plugin that easily allows anyone to add this same functionality. Written with best practices in mind, textCounter offers multiple character count ranges, custom coloration via CSS classes, and even the ability to prevent users from exceeding the character count limit.
Example
View a simple demo of textCounter
Quick start
Clone the git repo - git clone https://github.com/commadelimited/textCounter.js.git - or download it
Usage & Documentation
$(function(){
$('#theCounter').textCounter({
target: '#myTextarea' // required: string
});
});
$(function(){
$('#theCounter').textCounter({
target: '#myTextarea', // required: string
count: 70, // optional: if string, specifies attribute of target to use as value
// if integer, specifies value. [defaults 140]
alertAt: 20, // optional: integer [defaults 20]
warnAt: 10, // optional: integer [defaults 0]
stopAtLimit: false // optional: defaults to false
});
});
Contributing
You are invited to contribute code and suggestions to this project. The more the merrier.
Project Info / License
- Source: https://github.com/commadelimited/textCounter.js
3rd party libraries required:
- jQuery: MIT/GPL license
Custom bits:
MIT GPL
Related Skills
node-connect
346.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。

