From daf4c9dcae1606bb1554f6d3f42fbf5c2cc599fc Mon Sep 17 00:00:00 2001 From: Cheng-Han, Wu Date: Wed, 24 Feb 2016 10:35:52 +0800 Subject: Fixed mathjax might parse not specified elements and now pass array of elements --- public/js/extra.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'public') diff --git a/public/js/extra.js b/public/js/extra.js index ce00d0e3..200a4652 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -208,10 +208,8 @@ function finishView(view) { //mathjax var mathjaxdivs = view.find('.mathjax.raw').removeClass("raw").toArray(); try { - for (var i = 0; i < mathjaxdivs.length; i++) { - MathJax.Hub.Queue(["Typeset", MathJax.Hub, mathjaxdivs[i].innerHTML]); - MathJax.Hub.Queue(viewAjaxCallback); - } + MathJax.Hub.Queue(["Typeset", MathJax.Hub, mathjaxdivs]); + MathJax.Hub.Queue(viewAjaxCallback); } catch (err) {} //sequence diagram var sequences = view.find(".sequence-diagram.raw").removeClass("raw"); -- cgit v1.2.3