diff options
author | Jean-Michel Vedrine <vedrine@vedrine.org> | 2018-02-02 16:53:59 +0100 |
---|---|---|
committer | Jean-Michel Vedrine <vedrine@vedrine.org> | 2018-02-02 16:53:59 +0100 |
commit | 8ad4a477c15f928323da24aff4188bd7f0dca1d9 (patch) | |
tree | 0f0e488eaacefc304154d6e68e1e2a41cb148cb5 /amd/build | |
parent | ec3cabf60551be0c589b11fa5db8de302645988e (diff) |
Ajax dynamic formula display
Diffstat (limited to 'amd/build')
-rw-r--r-- | amd/build/display.min.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/amd/build/display.min.js b/amd/build/display.min.js new file mode 100644 index 0000000..cd5da13 --- /dev/null +++ b/amd/build/display.min.js @@ -0,0 +1 @@ +define(["jquery","core/config","core/notification"],function(a,b,c){return{init:function(){a(".algebra_answer").on("input paste keyup",null,null,function(){var d=a(this).attr("id"),e=d.replace(":","_"),f=a("#"+e+"_vars").html(),g=a(this).val(),h={vars:f,expr:g,sesskey:b.sesskey};a.post(b.wwwroot+"/question/type/algebra/ajax.php",h,null,"json").done(function(b){a("#"+e+"_display").html('<span class="filter_mathjaxloader_equation">'+b+"</span>"),MathJax.Hub.Queue(["Typeset",MathJax.Hub])}).fail(function(a,b,d){c.exception(d)})})}}});
\ No newline at end of file |