diff --git a/assets/js/mathjax.js b/assets/js/mathjax.js
index c5e15d5..cdec0bd 100644
--- a/assets/js/mathjax.js
+++ b/assets/js/mathjax.js
@@ -1,15 +1,13 @@
-document.addEventListener('DOMContentLoaded', () => {
- MathJax = {
- tex: {
- inlineMath: [
- ['$', '$'],
- ['\\(', '\\)']
- ],
- displayMath: [
- ['$$', '$$'],
- ['\\[', '\\]']
- ],
- tags: 'ams'
- }
- };
-});
\ No newline at end of file
+window.MathJax = {
+ tex: {
+ inlineMath: [
+ ['$', '$'],
+ ['\\(', '\\)']
+ ],
+ displayMath: [
+ ['$$', '$$'],
+ ['\\[', '\\]']
+ ],
+ tags: 'ams'
+ }
+};
diff --git a/layouts/partials/js-selector.html b/layouts/partials/js-selector.html
index 0cce980..9a7092e 100644
--- a/layouts/partials/js-selector.html
+++ b/layouts/partials/js-selector.html
@@ -89,9 +89,9 @@
{{ if .Params.math }}
{{ $mathjaxConfig := resources.Get "js/mathjax.js" | minify | fingerprint }}
-
+
-
+
{{ end }}