문제

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 ?

도움이 되었습니까?

해결책

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

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

다른 팁

The above might fail to work if you use a global variable M for something other than jqMath. The work-around is to call jqMath.parseMath(element); for example jqMath.parseMath(document.body);

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top