diff options
author | ache <ache@ache.one> | 2017-10-16 12:58:58 +0200 |
---|---|---|
committer | ache <ache@ache.one> | 2017-10-17 04:44:17 +0200 |
commit | 84ab3c30f477a34cf9015be728048e86b26c1d69 (patch) | |
tree | 9d210c924b34a11bcf118b5e4c32597ce7c615c3 | |
parent | HTML safe off (diff) |
MathJax integration
-rw-r--r-- | public/index.html | 1 | ||||
-rw-r--r-- | public/js/script.js | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/public/index.html b/public/index.html index 6f41c1f..8667fba 100644 --- a/public/index.html +++ b/public/index.html @@ -7,6 +7,7 @@ <link rel="icon" type="image/png" href="img/favicon.png" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> + <script src="http://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS_HTML-full"></script> <script src="js/script.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> diff --git a/public/js/script.js b/public/js/script.js index 4c9769a..cbc4221 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -7,13 +7,16 @@ $(document).ready(function() { e.stopPropagation(); $.get(this.href, function(data) { $('#md').html(data); + MathJax.Hub.Queue(["Typeset", MathJax.Hub]); }); }); + $('.directory').find('ul').hide(); $('.directory').click(function(e) { e.stopPropagation(); $(this).children('ul').slideToggle(); + MathJax.Hub.Queue(["Typeset", MathJax.Hub]); }); }); }); |