dist/ui/chico.js
function Countdown(el, options) {

        /**
         * Reference to context of an instance.
         * @type {Object}
         * @private
         */
        var that = this;

        this._init(el, options);

        if (this.initialize !== undefined) {
            /**
             * If you define an initialize method, it will be executed when a new Countdown is created.
             * @memberof! ch.Countdown.prototype
             * @function
             */
            this.initialize();
        }

        /**
         * Event emitted when the component is ready to use.
         * @event ch.Countdown#ready
         * @example
         * // Subscribe to "ready" event.
         * countdown.on('ready', function () {
         *     // Some code here!
         * });
         */
        window.setTimeout(function () { that.emit('ready'); }, 50);
    }
function Countdown(el, options) {

        /**
         * Reference to context of an instance.
         * @type {Object}
         * @private
         */
        var that = this;

        this._init(el, options);

        if (this.initialize !== undefined) {
            /**
             * If you define an initialize method, it will be executed when a new Countdown is created.
             * @memberof! ch.Countdown.prototype
             * @function
             */
            this.initialize();
        }

        /**
         * Event emitted when the component is ready to use.
         * @event ch.Countdown#ready
         * @example
         * // Subscribe to "ready" event.
         * countdown.on('ready', function () {
         *     // Some code here!
         * });
         */
        window.setTimeout(function () { that.emit('ready'); }, 50);
    }
function Countdown ( el , options ) { /**
         * Reference to context of an instance.
         * @type {Object}
         * @private
         */ var that = this ; this . _init ( el , options ) ; if ( this . initialize !== undefined ) { /**
             * If you define an initialize method, it will be executed when a new Countdown is created.
             * @memberof! ch.Countdown.prototype
             * @function
             */ this . initialize ( ) ; } /**
         * Event emitted when the component is ready to use.
         * @event ch.Countdown#ready
         * @example
         * // Subscribe to "ready" event.
         * countdown.on('ready', function () {
         *     // Some code here!
         * });
         */ window . setTimeout ( function ( ) { that . emit ( 'ready' ) ; } , 50 ) ; }
Countdown counts the maximum of characters that user can enter in a form control. Countdown could limit the possibility to continue inserting charset.
@memberof ch
@constructor
@augments ch.Component
@param {HTMLElement} el A HTMLElement to create an instance of ch.Countdown.
@param {Object} [options] Options to customize an instance.
@param {Number} [options.max] Number of the maximum amount of characters user can input in form control. Default: 500.
@param {String} [options.plural] Message of remaining amount of characters, when it's different to 1. The variable that represents the number to be replaced, should be a hash. Default: "# characters left.".
@param {String} [options.singular] Message of remaining amount of characters, when it's only 1. The variable that represents the number to be replaced, should be a hash. Default: "# character left.".
@returns {countdown} Returns a new instance of Countdown.
@example
// Create a new Countdown.
var countdown = new ch.Countdown([el], [options]);
@example
// Create a new Countdown with custom options.
var countdown = new ch.Countdown({
'max': 250,
'plural': 'Left: # characters.',
'singular': 'Left: # character.'
});
@example
// Create a new Countdown using the shorthand way (max as parameter).
var countdown = new ch.Countdown({'max': 500});
Countdown counts the maximum of characters that user can enter in a form control . Countdown could limit the possibility to continue inserting charset .