|
@@ -174,16 +174,17 @@ $('#comment-info').keyup(function() { |
|
@@ -174,16 +174,17 @@ $('#comment-info').keyup(function() { |
174
|
|
174
|
|
175
|
if (len === 0) {
|
175
|
if (len === 0) {
|
176
|
$wordCountTip.html('');
|
176
|
$wordCountTip.html('');
|
|
|
177
|
+ $commentBtn.removeClass('able');
|
177
|
$commentBtn.addClass('disable');
|
178
|
$commentBtn.addClass('disable');
|
178
|
} else {
|
179
|
} else {
|
179
|
if (len - MAX_COMMENTS_WORDS <= 0) {
|
180
|
if (len - MAX_COMMENTS_WORDS <= 0) {
|
180
|
showTxt = '还可以输入' + (MAX_COMMENTS_WORDS - len) + '字';
|
181
|
showTxt = '还可以输入' + (MAX_COMMENTS_WORDS - len) + '字';
|
181
|
$commentBtn.removeClass('disable');
|
182
|
$commentBtn.removeClass('disable');
|
182
|
- $commentBtn.css('background', '#1b1b1b');
|
183
|
+ $commentBtn.addClass('able');
|
183
|
} else {
|
184
|
} else {
|
184
|
showTxt = '已超过<span class="exceed-count">' + (len - MAX_COMMENTS_WORDS) + '</span>字';
|
185
|
showTxt = '已超过<span class="exceed-count">' + (len - MAX_COMMENTS_WORDS) + '</span>字';
|
|
|
186
|
+ $commentBtn.removeClass('able');
|
185
|
$commentBtn.addClass('disable');
|
187
|
$commentBtn.addClass('disable');
|
186
|
- $commentBtn.css('background', '#999');
|
|
|
187
|
}
|
188
|
}
|
188
|
}
|
189
|
}
|
189
|
$wordCountTip.html(showTxt);
|
190
|
$wordCountTip.html(showTxt);
|