Jqmath - apply after page load

情到浓时终转凉″ 提交于 2019-11-27 04:49:23

问题


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 ?


回答1:


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

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




回答2:


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);



来源:https://stackoverflow.com/questions/8517334/jqmath-apply-after-page-load

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!