...
|
...
|
@@ -174,16 +174,17 @@ $('#comment-info').keyup(function() { |
|
|
|
|
|
if (len === 0) {
|
|
|
$wordCountTip.html('');
|
|
|
$commentBtn.removeClass('able');
|
|
|
$commentBtn.addClass('disable');
|
|
|
} else {
|
|
|
if (len - MAX_COMMENTS_WORDS <= 0) {
|
|
|
showTxt = '还可以输入' + (MAX_COMMENTS_WORDS - len) + '字';
|
|
|
$commentBtn.removeClass('disable');
|
|
|
$commentBtn.css('background', '#1b1b1b');
|
|
|
$commentBtn.addClass('able');
|
|
|
} else {
|
|
|
showTxt = '已超过<span class="exceed-count">' + (len - MAX_COMMENTS_WORDS) + '</span>字';
|
|
|
$commentBtn.removeClass('able');
|
|
|
$commentBtn.addClass('disable');
|
|
|
$commentBtn.css('background', '#999');
|
|
|
}
|
|
|
}
|
|
|
$wordCountTip.html(showTxt);
|
...
|
...
|
|