【发布时间】:2013-07-28 01:28:08
【问题描述】:
这是我的 My JSFiddle
我正在尝试在单击复选框时添加一个类,但我似乎无法弄清楚如何以适合我已经拥有的代码的方式进行添加。
代码:
$(this).live("change keyup", function () {
var checkbox = $('#termscons').prop(':checked');
if (currid == "termcons") {
if (checkbox == 'checked') {
infobox.html("Accepted!");
infobox.addClass('good');
} else if (checkbox !== 'checked') {
infobox.html(replacehtml);
infobox.removeClass('good');
}
}
if ($('#termscons').next().hasClass('good')) {
$("#sendbtn").css("display", "block");
} else {
$("#sendbtn").css("display", "none");
}
【问题讨论】:
-
只是一个想法:确保他们一直向下滚动是一种并不真正违背用户体验的方式。让他们等待,比如 1 分钟,然后接受不利于用户体验。
标签: jquery forms validation checkbox