<div id="question_one">
<center>
<div class="questions"> Question #1 </div>
<div id="answer_1">
<button class="btn btn-success answers" id="correct_1"> Answer </button> <br>
<button class="btn btn-success answers" id="uncorrect_1"> Answer </button> <br>
<button class="btn btn-success answers" id="uncorrect_2"> Answer </button> <br>
<button class="btn btn-success answers" id="uncorrect_3"> Answer </button> <br>
</div>
</center>
</div>
<div style="float: left" id="points">
<span>
Number of question:
<span id="number_of_question"></span>
</span> <br>
<span>
Correctly:
<span id="correctly"></span>
</span> <br>
<span>
Wrong:
<span id="wrong"></span>
</span> <br>
</div>
window.onload = function () {
var correctly = 0;
var wrong = 0;
var question_number = 1;
jQuery("#question_one").css("display", "none");
jQuery("#question_two").css("display", "none");
jQuery("#question_three").css("display", "none");
var update = setInterval(function() {
jQuery("#correctly").text(correctly);
jQuery("#wrong").text(wrong);
jQuery("#number_of_question").text(question_number);
return question_number;
}, 1000/60);
if (question_number == 1) {
jQuery("#question_one").css("display", "block");
jQuery("#correct_1").click(function () {
correctly++;
jQuery("#question_one").css("display", "none");
question_number++;
});
jQuery("#uncorrect_1").click(function () {
wrong++;
jQuery("#question_one").css("display", "none");
question_number++;
});
jQuery("#uncorrect_2").click(function () {
wrong++;
jQuery("#question_one").css("display", "none");
question_number++;
});
jQuery("#uncorrect_3").click(function () {
wrong++;
jQuery("#question_one").css("display", "none");
question_number++;
});
}
else if (question_number == 2) {
console.log(2);
}
};