From 3bfc2a7406e875b11063033e7d22010c4dc05925 Mon Sep 17 00:00:00 2001 From: Philipp Fischbeck Date: Tue, 28 Nov 2017 11:43:29 +0100 Subject: [PATCH] Rerun MathJax when previewing a translation --- app/assets/javascripts/translations.js.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/translations.js.coffee b/app/assets/javascripts/translations.js.coffee index 2c1c09c..843e89f 100644 --- a/app/assets/javascripts/translations.js.coffee +++ b/app/assets/javascripts/translations.js.coffee @@ -17,4 +17,5 @@ $(document).on "turbolinks:load", loadCodeMirror $(document).on "click", '#translationNav a[href="#preview"]', -> - $('#preview .problem-content').html(cm.getValue()) \ No newline at end of file + $('#preview .problem-content').html(cm.getValue()) + MathJax.Hub.Queue(["Typeset",MathJax.Hub]); \ No newline at end of file