We all know that MathJax renders elements on window onload by default (and can be refreshed using MathJax.Hub.Queue(["Typeset",MathJax.Hub]); Reference Link), but is there a way to ‘unrender’ the elements? So for example, after the page just loaded, I can click a button, and all the elements will turn back into their TeX code. Is that possible?
We all know that MathJax renders elements on window onload by default (and can
Share
It seems that MathJax hides the original LaTeX code in an element called
MathJax-Element-x, which contains the original code. So what I did was simply hide all elements with the classMathJax_Display, in which the formatted version appeared, and showed all elements starting withMathJax-Element-. Seemed to work fine.EDIT: Instead of selecting
MathJax_Displayelements, I had to select all the elements insideMathJax_Display, likeMathJax_Display *. I also had to change the type of element the LaTeX code was put in, as it was in a script.