zsljulius
zsljulius

Reputation: 51

Mathjax after Ajax call

So my problem is as follow: So firstly, I made a ajax call to another page and replaces some of the elements in my current DOM with the new information, which utilize Mathjax to render their math formulas. However, after my ajax call, Mathjax doesn't seem to be loaded again thus not rendering the math formulas for my new math formulas. Does anyone have encountered this before? What is the solution?

Thanks a lot

Upvotes: 3

Views: 1363

Answers (2)

Martin
Martin

Reputation: 4222

In addition to Daniel O'Hara answer you also might try to call MathJax.Hub.Queue(["Reprocess",MathJax.Hub]). Or call MathJax.Hub.Typeset() directly but its not recommended to do so in production

Upvotes: 0

Daniel O'Hara
Daniel O'Hara

Reputation: 13438

This Mathjax documentation page should help you a lot.

For example, it has MathJax.Hub.Queue(["Typeset",MathJax.Hub]); method call to update every new node on the page.

Upvotes: 3

Related Questions