Commit 93883d15 by doszhang

dos

parent fe9d0c03
......@@ -115,51 +115,54 @@ $(document).ready(function () {
});
function prevQuestion() {
let nowIndex = nowQuestionIndex;
$('.question' + nowQuestionIndex + '-block').addClass('fadeoutleft');
setTimeout(function () {
$('.question' + nowIndex + '-block').removeClass('fadeoutleft').hide();
}, 1000);
$('.btn-submit').hide();
$('.btn-nextquestion').show();
nowQuestionIndex--;
nowAnswer = answerArr[nowQuestionIndex - 1];
$('.question-page .point').animate({
'left': '' + 5.5 * (nowQuestionIndex - 1) + 'rem'
}, 500);
setTimeout(function () {
$('.question' + nowQuestionIndex + '-block').show();
}, 900);
}
function nextQuestion(e) {
if (nowAnswer !== '') {
if (nowQuestionIndex != 1) {
let nowIndex = nowQuestionIndex;
answerArr[nowQuestionIndex - 1] = nowAnswer;
nowAnswer = '';
$('.question' + nowQuestionIndex + '-block').addClass('fadeoutleft');
setTimeout(function () {
$('.question' + nowIndex + '-block').removeClass('fadeoutleft').hide();
}, 1000);
nowQuestionIndex++;
$('.btn-submit').hide();
$('.btn-nextquestion').show();
nowQuestionIndex--;
nowAnswer = answerArr[nowQuestionIndex - 1];
$('.question-page .point').animate({
'left': '' + 5.5 * (nowQuestionIndex - 1) + 'rem'
}, 500);
if (nowQuestionIndex == 5) {
$('.btn-submit').show();
$('.btn-nextquestion').hide();
}
setTimeout(function () {
$('.question' + nowQuestionIndex + '-block').show();
}, 900);
} else {
if (e != 'indexbar') {
$('#notification_area').remove();
my_notify('请选择答案');
return false;
}
}
}
function nextQuestion(e) {
if (nowQuestionIndex != 5) {
if (nowAnswer !== '') {
let nowIndex = nowQuestionIndex;
answerArr[nowQuestionIndex - 1] = nowAnswer;
nowAnswer = '';
$('.question' + nowQuestionIndex + '-block').addClass('fadeoutleft');
setTimeout(function () {
$('.question' + nowIndex + '-block').removeClass('fadeoutleft').hide();
}, 1000);
nowQuestionIndex++;
$('.question-page .point').animate({
'left': '' + 5.5 * (nowQuestionIndex - 1) + 'rem'
}, 500);
if (nowQuestionIndex == 5) {
$('.btn-submit').show();
$('.btn-nextquestion').hide();
}
setTimeout(function () {
$('.question' + nowQuestionIndex + '-block').show();
}, 900);
} else {
if (e != 'indexbar') {
$('#notification_area').remove();
my_notify('请选择答案');
return false;
}
}
}
}
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