var q = [
{'Q':'How do you write "Hello World" in an alert box?', 'A':2,'C':['msg("Hello World");','alert("Hello World");','alertBox("Hello World");'],'H':"Hint 1"},
{'Q':'How do you create a function in JavaScript?', 'A':3,'C':['function:myFunction()','function = myFunction()','function myFunction()'],'H':"Hint 1"},
{'Q':'How to write an IF statement in JavaScript?', 'A':1,'C':['if (i == 5)','if i = 5 then','if i == 5 then'],'H':"Hint 1"},
{'Q':'How does a FOR loop start?', 'A':2,'C':['for (i = 0; i <= 5)','for (i = 0; i <= 5; i++)','for i = 1 to 5'],'H':"Hint 1"},
{'Q':'What is the correct way to write a JavaScript array?', 'A':3,'C':['var colors = "red", "green", "blue"','var colors = (1:"red", 2:"green", 3:"blue")','var colors = ["red", "green", "blue"]'],'H':"Hint 1"}
];
$(function(){
var loading = $('#loadbar').hide();
$(document)
.ajaxStart(function () {
loading.show();
}).ajaxStop(function () {
loading.hide();
});
var choicecount = 1;
var allowchoice = true;
var questionNo = 0;
$('#question').html(q[questionNo].Q);
$($('#f-option').parent().find('label')).html(q[questionNo].C[0]);
$($('#s-option').parent().find('label')).html(q[questionNo].C[1]);
$($('#t-option').parent().find('label')).html(q[questionNo].C[2]);
$(document.body).on('click',"#show-hint-button",function (e) {
$('.show-hint').removeClass('hidden');
});
$(document.body).on('click',"label.element-animation",function (e) {
var choice = $(this).parent().find('input:radio').val();
console.log(choice);
var anscheck = $(this).checking(questionNo, choice);