Search code examples
parsingmathtriggersjqmath

Jqmath - apply after page load


I would like to apply the jqMath script after the initial page load.

The problem I have is that I make an ajax call which retrieves some jqMath syntax and loads it into a div section of the main page.

However the syntax is not currently being parsed. How do I ensure jqMath can be triggered when the ajax call returns and applied to the appropriate div section ?


Solution

  • Call M.parseMath(myDiv); after loading myDiv.

    For example, jqMath automatically does M.parseMath(document.body); after the initial page load.