Widget:SandboxNew: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 94: | Line 94: | ||
function loadQuestion(){ | function loadQuestion(){ | ||
var Questions = $("input[name='stash']").val().split(","); | var Questions = $("input[name='stash']").val().split(","); | ||
var name = Questions[parseInt($("input[name='pos']").val())-1]; | var name = Questions[parseInt($("input[name='pos']").val())-1]; | ||
Line 121: | Line 120: | ||
$( "input[name='answer']" ).click(function(){ | $( "input[name='answer']" ).click(function(){ | ||
var Results = $("input[name='results']").val().split(","); | var Results = $("input[name='results']").val().split(","); | ||
var Pos = parseInt($("input[name='pos']").val()); | var Pos = parseInt($("input[name='pos']").val()) - 1; | ||
if(short.RightAnswer.valueOf() == $( this ).val().valueOf()){ | if(short.RightAnswer.valueOf() == $( this ).val().valueOf()){ | ||
Results[Pos] = true; | Results[Pos] = true; |