Widget:WJG Sandbox: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 698: | Line 698: | ||
$("#next").click(exam, questionNavigation); | $("#next").click(exam, questionNavigation); | ||
$("#finish").click(exam, endExam); | $("#finish").click(exam, endExam); | ||
$("#flag").click(exam,flagQ); | |||
if (exam.timer) { | if (exam.timer) { | ||
$("#bodyContent").append("<div style='position:absolute; z-index:1000; width:300px; height:50px; top:0px; right:0px; border: 1px solid #000; background-color:#EEE; float:right; visibility:hidden;' id='timerBox'>Testing.</div>"); | $("#bodyContent").append("<div style='position:absolute; z-index:1000; width:300px; height:50px; top:0px; right:0px; border: 1px solid #000; background-color:#EEE; float:right; visibility:hidden;' id='timerBox'>Testing.</div>"); | ||
Line 779: | Line 780: | ||
}); | }); | ||
$("#lab_vals").click(function(){ | $("#lab_vals").click(function(){ | ||
$("#details").stop(); | $("#details").stop(); | ||
Line 975: | Line 970: | ||
questionReview(event.data); | questionReview(event.data); | ||
} | } | ||
// $('#flag').click(function(){ | |||
//var cur_q=exam.currentQuestion; | |||
// var temp_flag_div_id='.navPaneButton#'+cur_q; | |||
// $("#" + event.data.currentQuestion).toggleClass('flagged'); | |||
//alert("You clicked the flag!"+temp_flag_div_id); | |||
}) | |||
function flagQ(event) { | |||
$("#" + event.data.currentQuestion).toggleClass("flagged"); | |||
} | |||
function endExam(event) { | function endExam(event) { | ||
if (event.data.timer) { | if (event.data.timer) { |