1.0.5 • Published 10 years ago

maj-text-counter v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

maj Text Counter Plugin

A jQuery plugin for counting and limiting characters/words on text input, or textarea, elements (using .val()).

Installation

Include script after the jQuery library:

<script src="/javascripts/maj-text-counter.js"></script>

Usage

Basic usage:

$('input').majTextCounter();

Limit to a maximum words count:

$('input').majTextCounter({
	wordLimit: 10,
});

Limit to a maximum caracters count:

$('input').majTextCounter({
	carLimit: 10,
});

Speak french ?:

$('input').majTextCounter({
    words: "mots",
    letters: "lettres",
    separator: " & ",
    maximum: "MAX :",
});

Elements

By default the plugin add the following element after the input/textarea:

<span class="maj-text-counter">2 words | 14 letters</span>

Development

Authors

miseajour.net

1.0.5

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago