$('#toggle').click(() => $('#square').toggle());
var divs=document.getElementsByClassName('divs'); var emoji=document.getElementById('emoji'); var scoreShower=document.getElementById('scoreShower'); var scoreView=document.getElementById('score'); var current=document.getElementById('current'); var currentTotal=document.getElementById('currentTotal'); var selectVal=document.getElementById("option1").value; var selectVa2=document.getElementById("option2").value;
var quest=document.getElementById('quest'); var option1=document.getElementById('option1'); var option2=document.getElementById('option2');
var button1=document.getElementById('btn1'); var section1=document.getElementById('start'); var section2=document.getElementById('questions'); var myName = ""; button1.onclick=function(){ var input = document.getElementById("userInput").value; nameshow.innerHTML=input; nameshow1.innerHTML=input; section1.style.display="none"; section2.style.display="block"; myName = input; renderQuestion(); } let questions=[ { question:" Do you have a fever?",
choiceA:" ", choiceB:" ", correct:"NO", }, { question:" Are you coughing?",
choiceA:" ", choiceB:" ", correct:"NO", }, { question:" Are you close contact with sick people?",
choiceA:" ", choiceB:" ", correct:"NO", }, { question:"Are you travel during lockdown period?",
choiceA:" ", choiceB:" ", correct:"NO", }, { question:"Do you often touch your face?",
choiceA:"", choiceB:"",
correct:"NO", }, { question:"Do you wash your hands often? If not, select Yes.",
choiceA:" ", choiceB:" ", correct:"NO", }, { question:"Not using a face mask? If not, select yes.?",
choiceA:" ", choiceB:" ", correct:"NO", }, { question:" Are you feeling a headache?",
choiceA:" ", choiceB:" ", correct:"NO", } ]
var counts=1; var totalScore=0; var runningQuestion=0;
function renderQuestion(){ let q=questions[runningQuestion]; quest.innerHTML=q.question; option1.innerHTML=q.choiceA; option2.innerHTML=q.choiceB;
}
var buttons=document.getElementsByClassName('options');
for(i=0;i