Giter Site home page Giter Site logo

textcounter.js's Introduction

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

3rd party libraries required:

  • jQuery: MIT/GPL license

Custom bits:

MIT GPL

Bitdeli Badge

textcounter.js's People

Contributors

commadelimited avatar 06b avatar bitdeli-chef avatar

Stargazers

Alper Dereli avatar Arifur Rahman avatar Francois-Guillaume Ribreau avatar James Moore avatar Yaşar İÇLİ avatar ฬะทçะรโลนร avatar MarQuis Knox avatar pukoo avatar Inna Gritsinova avatar Bryce Adams avatar  avatar Shane Daniel avatar  avatar Guy avatar  avatar Oshan Wisumperuma avatar Willy Dash avatar Jim avatar Adnan Abdulhussein avatar Rick Carlino avatar  avatar thinkphper avatar keepallsimple avatar Allen.M avatar Oğuz Çelikdemir avatar Simeon Willbanks avatar Dennis Castro avatar Lyman Lai avatar Josiah Ivey avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.