Authored by zhangxiaoru

editorialbtn

... ... @@ -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);
... ...
... ... @@ -448,12 +448,20 @@
text-align: center;
color: #fff;
font-size: 14px;
background: #999;
background: #000;
cursor: pointer;
&:hover {
/* &:hover {
background: #000;
}
}*/
}
.disable {
background: #999;
}
.able {
background: #000;
}
.comments-wrap {
... ...