这里是my code:
MathJax.Hub.Config({
tex2jax: {
inlineMath: [
['$', '$'],
['\\(', '\\)']
],
processClass: "mathjax",
ignoreClass: "no-mathjax"
}
});
preview();
$("textarea").on("load keydown", function(){
preview();
})
function preview(){
var t_val = $("textarea").val();
$(".mathjax").html(t_val);
}
MathJax
将在您加载页面时应用。但是当您更改dom时,它将不会再次更新。如何使每次按键更新?