1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2025-12-10 00:36:42 +01:00

Make CodeMirror and MathJax work with turbolinks

This commit is contained in:
Philipp Fischbeck 2017-11-23 15:06:56 +01:00
parent b624870f9b
commit ab93f90eae
2 changed files with 4 additions and 4 deletions

View File

@ -1,2 +1,2 @@
$(document).on 'page:load', ->
window.MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
$(document).on 'turbolinks:load', ->
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);

View File

@ -13,8 +13,8 @@ loadCodeMirror = ->
mode: "text/html"
})
$(document).ready loadCodeMirror
$(document).on "page:load", loadCodeMirror
$(document).on "turbolinks:load", loadCodeMirror
$(document).on "click", '#translationNav a[href="#preview"]', ->
$('#preview .problem-content').html(cm.getValue())