diff --git a/main.html b/main.html index f9ef7c896d..81326ee995 100644 --- a/main.html +++ b/main.html @@ -3,24 +3,23 @@ MITX 6.002 - - - - + + + - - + + - + diff --git a/problem.html b/problem.html index 062f45affa..cf8a6c633f 100644 --- a/problem.html +++ b/problem.html @@ -25,6 +25,7 @@ // Possible cleanup: Move from getJSON to just load $.getJSON('/modx/problem/${ id }/problem_reset', {'id':'${ id }'}, function(json) { $('#main_${ id }').html(json); + MathJax.Hub.Queue(["Typeset",MathJax.Hub]); }); } }); diff --git a/seq_module.js b/seq_module.js index 5da9511fca..766f24ef40 100644 --- a/seq_module.js +++ b/seq_module.js @@ -16,9 +16,13 @@ var ${ id }functions=["", var ${ id }loc; function ${ id }goto(i) { + // TODO: + // ${ id }contents[${ id }loc] = $('#content').html(); $('#content').html(${ id }contents[i]); ${ id }functions[i]() + $('#tt_'+${ id }loc).attr("style", "background-color:grey"); ${ id }loc=i; + $('#tt_'+i).attr("style", "background-color:red"); MathJax.Hub.Queue(["Typeset",MathJax.Hub]); } @@ -27,15 +31,15 @@ function ${ id }setup_click(i) { } function ${ id }next() { - ${ id }loc=${ id }loc+1; - if(${ id }loc> ${ len(items) } ) ${ id }loc=${ len(items) }; - ${ id }goto(${ id }loc); + var i=${ id }loc+1; + if(i > ${ len(items) } ) i = ${ len(items) }; + ${ id }goto(i); } function ${ id }prev() { - ${ id }loc=${ id }loc-1; - if(${ id }loc<1) ${ id }loc=1; - ${ id }goto(${ id }loc); + var i=${ id }loc-1; + if (i < 1 ) i = 1; + ${ id }goto(i); } $(function() {