summaryrefslogtreecommitdiff
path: root/web/scripts/growth.js
blob: c4091ed18ada0d1a5844394061ac26bf24178664 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function notice(msg)
{
    alert(msg);
}

function selectAnswer(element)
{
    $(element).siblings('.selected').removeClass('selected');
    $(element).addClass('selected');
    $("#answerField").val(element.id);
}

function nextQuestion()
{
    var selectedAnswer = $("#answerField").val();
    
    if (selectedAnswer == '') {
        notice('Please select an answer before moving to the next question');
        return;
    }

    $("#questionForm").submit();
}