Widget:Sandbox: Difference between revisions

Jump to navigation Jump to search
Matt Pijoan (talk | contribs)
No edit summary
Matt Pijoan (talk | contribs)
No edit summary
Line 682: Line 682:
}
}
function answerClicked(event) {
function answerClicked(event) {
        console.log(event);
$(".answer").removeClass("boxed");
$(".answer").removeClass("boxed");
$('input[type=radio]').prop('checked', function () {
$('input[type=radio]').prop('checked', function () {
return this.getAttribute('checked') == 'checked';
return this.getAttribute('checked') == 'checked';
});
});
$(this).addClass("boxed");
event.currentTarget.addClass("boxed");
$(this).prop("checked", true);
event.currentTarget.prop("checked", true);
if ($("#exam").find('#submit').length == 0) {
if ($("#exam").find('#submit').length == 0) {
$("#examSpace").append("<div class='noSelect WBRButton' id='submit'><br />Submit</div>");
$("#examSpace").append("<div class='noSelect WBRButton' id='submit'><br />Submit</div>");

Revision as of 16:01, 27 June 2014