From 1527a1e3873e2edde6568de4357fd0b1283f051c Mon Sep 17 00:00:00 2001 From: ichuang Date: Sat, 2 Jun 2012 23:03:58 -0400 Subject: [PATCH] problem.js: change "show answer" to put result in .html instead of .text (OK everyone?) also some changes to try to fix the codemirror problem --- templates/problem.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/problem.js b/templates/problem.js index c34c5d92e4..d6c247dcb4 100644 --- a/templates/problem.js +++ b/templates/problem.js @@ -2,6 +2,7 @@ function ${ id }_content_updated() { MathJax.Hub.Queue(["Typeset",MathJax.Hub]); update_schematics(); + // dynamic math display: generate MathML on click $.each($("[id^=display_${ id }_]"), function(index,value){ theid = value.id.replace("display_",""); // ID of the response @@ -93,7 +94,8 @@ function ${ id }_content_updated() { $("label[for="+choice_id+"]").attr("correct_answer", "true"); } } - $("#answer_"+key).text(data[key]); + // $("#answer_"+key).text(data[key]); + $("#answer_"+key).html(data[key]); } });