Hierarchy

  • Settings

Index

Properties

Optional append

append: boolean

By default, inserts the counter after the desired DOM element. If set to false, this will place the counter before the (either custom or default) target element.

Optional containerClass

containerClass: string

Let's say you have multilple counters on a single page and want them all to be styled the same way. In this case, we have a class named wrapper. All you need to do is set the containerClass property to the name of the class.

This will add the classname to the counter, giving you an easy way to style multiple counters.

Optional count

Count up or down to or from your goal

Optional goal

goal: number | "sky"

The goal number. If you are counting down, the counter will start on this number. If however you are counting up, the counter will end on this number.

Sky's the limit! Setting the goal to the string 'sky' enables counting up, infinitely without stopping the user.

Optional msg

msg: false | string

There are various defaults set based on the type, count options being used. You can set your own message to be added after the input field using this plugin. If you want the message off, just set the text to false.

Optionally, you can use the translation option to translate the default language of the message that is shown after the input field.

Optional target

target: false | string

Passing a valid jQuery selector will use that DOM element to place the counter on the page.

Optional text

text: boolean

Set false if you only want the numbers to show and not the words ( msg ).

Optional translation

translation: string

By providing a string of 4 words separated by space, you can include your own translation used to build the message you show to your users.

Translate the following words (from English)

  • character
  • word
  • remaining
  • maximum

For example: 'Zeichen Wort verbleibend maximal'

Optional type

type: CountType

Count characters or words by using 'char' or 'word' respectively.