Commit a59e58e2 by doszhang

dos

parent 2d546abe
...@@ -89,8 +89,14 @@ function nextQuestion() { ...@@ -89,8 +89,14 @@ function nextQuestion() {
function chooseAnswer(e) { function chooseAnswer(e) {
let node = $(e.target); let node = $(e.target);
$('.answer-active').hide(); $('.answer-active').hide();
nowAnswer = node.parent('.question-block').find('.answer').index(); if (node.attr('class').indexOf('active') != -1) {
node.find('div[class$=-active]').show(); nowAnswer = '';
} else {
nowAnswer = node.parent('.question-block').find('.answer').index();
node.find('div[class$=-active]').show();
}
console.log('nowAnswer:' + nowAnswer);
} }
function showQuestion() { function showQuestion() {
......
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