|
24 | 24 | // append the count element
|
25 | 25 | var counterText = base.options.countDown ? base.options.countDownText : base.options.counterText,
|
26 | 26 | counterNum = base.options.countDown ? base.options.max : 0,
|
27 |
| - $formatted_counter_text = $('<div/>').addClass(base.options.textCountMessage) |
| 27 | + $formatted_counter_text = $('<div/>').addClass(base.options.textCountMessageClass) |
28 | 28 | .html(counterText.replace('%d', '<span class="' + base.options.textCountClass + '">' + counterNum + '</span>')),
|
29 | 29 | $count_overflow_text = $('<div/>').addClass(base.options.countOverflowContainerClass);
|
30 | 30 |
|
|
249 | 249 | };
|
250 | 250 |
|
251 | 251 | base.setOverflowMessage = function () {
|
252 |
| - base.hideMessage(base.$container.find('.' + base.options.textCountMessage)); |
| 252 | + base.hideMessage(base.$container.find('.' + base.options.textCountMessageClass)); |
253 | 253 |
|
254 | 254 | base.removeOverflowMessage();
|
255 | 255 |
|
|
281 | 281 |
|
282 | 282 | if ($countEl.children('.error-text').length == 0) {
|
283 | 283 | base.removeOverflowMessage();
|
284 |
| - base.showMessage(base.$container.find('.' + base.options.textCountMessage)); |
| 284 | + base.showMessage(base.$container.find('.' + base.options.textCountMessageClass)); |
285 | 285 | $this.removeClass(base.options.inputErrorClass);
|
286 | 286 | $countEl.removeClass(base.options.counterErrorClass);
|
287 | 287 | }
|
|
297 | 297 | 'max' : 200, // maximum number of characters/words, -1 for unlimited, 'auto' to use maxlength attribute
|
298 | 298 | 'countContainerElement' : "div", // HTML element to wrap the text count in
|
299 | 299 | 'countContainerClass' : "text-count-wrapper", // class applied to the countContainerElement
|
300 |
| - 'textCountMessage' : "text-count-message", // class applied to the counter message |
| 300 | + 'textCountMessageClass' : "text-count-message", // class applied to the counter message |
301 | 301 | 'textCountClass' : "text-count", // class applied to the counter length (the count number)
|
302 | 302 | 'inputErrorClass' : "error", // error class appended to the input element if error occurs
|
303 | 303 | 'counterErrorClass' : "error", // error class appended to the countContainerElement if error occurs
|
|
0 commit comments