Commit 93883d15 by doszhang

dos

parent fe9d0c03
...@@ -115,6 +115,7 @@ $(document).ready(function () { ...@@ -115,6 +115,7 @@ $(document).ready(function () {
}); });
function prevQuestion() { function prevQuestion() {
if (nowQuestionIndex != 1) {
let nowIndex = nowQuestionIndex; let nowIndex = nowQuestionIndex;
$('.question' + nowQuestionIndex + '-block').addClass('fadeoutleft'); $('.question' + nowQuestionIndex + '-block').addClass('fadeoutleft');
setTimeout(function () { setTimeout(function () {
...@@ -130,9 +131,11 @@ function prevQuestion() { ...@@ -130,9 +131,11 @@ function prevQuestion() {
setTimeout(function () { setTimeout(function () {
$('.question' + nowQuestionIndex + '-block').show(); $('.question' + nowQuestionIndex + '-block').show();
}, 900); }, 900);
}
} }
function nextQuestion(e) { function nextQuestion(e) {
if (nowQuestionIndex != 5) {
if (nowAnswer !== '') { if (nowAnswer !== '') {
let nowIndex = nowQuestionIndex; let nowIndex = nowQuestionIndex;
answerArr[nowQuestionIndex - 1] = nowAnswer; answerArr[nowQuestionIndex - 1] = nowAnswer;
...@@ -159,7 +162,7 @@ function nextQuestion(e) { ...@@ -159,7 +162,7 @@ function nextQuestion(e) {
return false; return false;
} }
} }
}
} }
function chooseAnswer(e) { function chooseAnswer(e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment