With this quiz, use AJAX to get questions & answers
My original post is at
Not sure if codingforums is against reposting a question, but I'd really like to make some progress today.
Like the forum title says, I'm making a quiz using Jquery-AJAX to take questions from the database. But Firebug's not giving me any details aside from undefined variables when I think I have defined them.
//In the php database, they are called answer1, answer2...
//On this script, they are called answ1, answ2...
//On the html, they are called ans1, ans2...
var quest = $('#questionTxt').val();
var answ1 = $('#answer1').val();
var answ2 = $('#answer2').val();
var answ3 = $('#answer3').val();
var answ4 = $('#answer4').val();
var hint = $('#hint').val();
//var questNum = $('pid').val();
var questNum = 1;
//var hint = "Whaaaaat";
//function Question(questionTxt, questionAns);
$(this).fadeOut(); //It seems to be skipping this animation.
console.log(questionTxt); // I get <div id="questionTxt"> in the console.