最后一题bug修复:473(subject.html) / 485(chapter.html) 行的方法内容修改:
$("#b10").click(function() {
var cbl10 = 0;
var code = 0;
$('#q10 input:checkbox[name="cb10"]').each(function() {
// console.log($(this).is(":checked"),$(this).val());
if ($(this).is(":checked").toString() == $(this).val()) {
code++;
}
if ($(this).is(":checked") == true) {
cbl10++;
}
});
if (cbl10 == 0) {
$("#msg10").fadeIn(500);
} else {
// console.log(code,cbl10);
setTimeout('$("#q10").fadeOut(100);', 1);
setTimeout('$("#a10").fadeIn(1000);', 100);
if (code == $('#q10 input:checkbox[name="cb10"]').length) {
a10 = 1;
setTimeout('$("#r10").slideDown()', 500);
} else {
setTimeout('$("#w10").slideDown()', 500);
}
// var checkList = new Array();
// var rightList = new Array("cb10_1","cb10_2", "cb10_3");
// var rightFlag = false;
// if (cbl10.length == rightList.length) {
// cbl10.each(function () {
// checkList.push($(this).attr("id"));
// });
// }
// if (checkList.sort().toString() == rightList.sort().toString()) {
// rightFlag = true;
// }
// if (rightFlag) {
// a10 = 1;
// setTimeout('$("#r10").slideDown()', 500);
// }
// else {
// setTimeout('$("#w10").slideDown()', 500);
// }
}
});
回复