Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to detect that the rendering process of Mathjax has completed? #1611

Closed
TonyChanNJU opened this issue Sep 2, 2016 · 1 comment
Closed
Labels

Comments

@TonyChanNJU
Copy link

TonyChanNJU commented Sep 2, 2016

The rendering process need almost 1 sec on mobile device.

I want to hide the process, using a div.

So, is there any api, event or config to tell user the process has completed ?

Thanks!

@dpvc
Copy link
Member

dpvc commented Sep 2, 2016

You can push a function onto the MathJax queue, and it will not be run until the previous actions in the queue (and in particular, the typesetting) is complete. E.g.,

<script type="text/x-mathjax-config">
MathJax.Hub.Queue(function () {
   ... this won't run until the initial typesetting is done ...
});
</script>

Put this before the script that loads MathJax.js itself.

See this page for an example of how you might use this to make the page visible only after the math has been typeset.

@dpvc dpvc added the Question label Sep 2, 2016
@pkra pkra closed this as completed Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants