Commit 361c68f8 by ichuang

another fix to dynamath display timing - problem.js content_updated display

parent 2f33bce7
...@@ -3,11 +3,11 @@ function ${ id }_content_updated() { ...@@ -3,11 +3,11 @@ function ${ id }_content_updated() {
update_schematics(); update_schematics();
// dynamic math display: generate MathML on click // dynamic math display: generate MathML on click
$.each($("[id^=input_${ id }_]"), function(index,value){ $.each($("[id^=display_${ id }_]"), function(index,value){
theid = value.id.replace("input_",""); // ID of the response theid = value.id.replace("display_",""); // ID of the response
if (document.getElementById("display_" + theid)){ if (document.getElementById("input_" + theid)){
MathJax.Hub.queue.Push(function () { MathJax.Hub.queue.Push(function () {
math = MathJax.Hub.getAllJax("display_" + theid)[0]; math = MathJax.Hub.getAllJax(value.id)[0];
if (math){ if (math){
math.Text(document.getElementById("input_" + theid).value); math.Text(document.getElementById("input_" + theid).value);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment