Hi there I have this code demo for a quiz that I downloaded from a old question answered by redesign. I was wondering how I would add a flase anaswer option. Is it just a case of adding another button?
Any help would be much appiciated....
i = 0;
sym.$("btn").click(function(){
i++;
sym.play("s" + i);
if (i==1){
q1 = 20;
//sym.$("question1").html(q1);
}
if (i==2){
q2 = 10;
//sym.$("question2").html(q2);
}
if (i==3){
q3 = 60;
//sym.$("question3").html(q3);
}
var FinalScoreHolder = q1 + q2 + q3;
if (i=4){
//var FinalScoreHolder = q1 + q2 + q3;
sym.$("grade").html("You scored "+FinalScoreHolder+"%");
if (FinalScoreHolder >= 89) {
// play the timeline from the given position (ms or label)
sym.play("pass");
} else {
// play the timeline from the given position (ms or label)
sym.play("fail");
}
}
});