加载后的 LaTeX 公式 html
LaTeX formulas after load html
我想在使用
后加载Mathjax
的script
( 'div#someone' ).load( "http source" )
实际上,当页面在 header.
中完全加载时,它工作得很好
<script class="mathlab" type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [["$","$"], ["\(","\)"]]}});</script>
<script class="mathlab" type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
有人知道加载后如何刷新脚本吗?或者可能是另一个脚本?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\(','\)']]}});</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript">
$("button").click(function() {
$("div").text( "Hello ! What is $x$ in the formula : $$x+3=7$$" );
});
</script>
Hello ! What is $x$ in the formula : $$x+3=7$$
<div> <button>Load something</button> </div>
只需添加
$( "div#someone" ).load( "http source", function () {
MathJax.Hub.Queue(["Typeset", MathJax.Hub, "div#someone"]);
});
我想在使用
后加载Mathjax
的script
( 'div#someone' ).load( "http source" )
实际上,当页面在 header.
中完全加载时,它工作得很好<script class="mathlab" type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [["$","$"], ["\(","\)"]]}});</script>
<script class="mathlab" type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
有人知道加载后如何刷新脚本吗?或者可能是另一个脚本?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\(','\)']]}});</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript">
$("button").click(function() {
$("div").text( "Hello ! What is $x$ in the formula : $$x+3=7$$" );
});
</script>
Hello ! What is $x$ in the formula : $$x+3=7$$
<div> <button>Load something</button> </div>
只需添加
$( "div#someone" ).load( "http source", function () {
MathJax.Hub.Queue(["Typeset", MathJax.Hub, "div#someone"]);
});