Hi ,
i have found how to reset all the radio button , but i need to reset the massage after which tell the right answer .
some help pls
HTML
<button id="resetButton" type="button" onclick="resetAns()">Reset Answer !</button>
js
function resetAns() {
this.checkAnswers();
for (var i = 1; i <= totalQCount; i++) {
if ($("input[name='Q" + i + "']:checked")) {
$("input[name='Q" + i + "']").prop("checked", false);
}
}
}
function checkAnswers() {
for (var i = 1; i <= totalQCount; i++) {
var qObj = lstQuestions[i - 1];
var radioValue = $("input[name='Q" + i + "']:checked").val();
if (radioValue) {
var resultDivId = "result" + i + "Div";
$("#" + resultDivId).html("correct answerr is " + qObj.correct_answer.fontcolor("green"));
}
}
}