This really depends on how fancy you want to be, but the quick and dirty way is to hide everything and use the MathJax queue to turn things visible.
1) make your main element visibility:hidden
(don't use display:none
, this can interfere with MathJax)
2) Then, after the call to MathJax.js
, add a script to remove hidden
after the initial bunch of elements in the MathJax queue have been cleared (i.e., the initial typesetting is done). Something like this
MathJax.Hub.Queue( function () { document.getElementById('MainID').style.visibility = ""; }
);
should do the trick -- see http://jsfiddle.net/26rvZ/
I hope this gets you started.