mirror of
https://github.com/projekteuler/projekteuler.git
synced 2025-12-10 08:46:41 +01:00
Make CodeMirror and MathJax work with turbolinks
This commit is contained in:
parent
b624870f9b
commit
ab93f90eae
@ -1,2 +1,2 @@
|
|||||||
$(document).on 'page:load', ->
|
$(document).on 'turbolinks:load', ->
|
||||||
window.MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
|
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
|
||||||
@ -13,8 +13,8 @@ loadCodeMirror = ->
|
|||||||
mode: "text/html"
|
mode: "text/html"
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).ready loadCodeMirror
|
$(document).on "turbolinks:load", loadCodeMirror
|
||||||
$(document).on "page:load", loadCodeMirror
|
|
||||||
|
|
||||||
$(document).on "click", '#translationNav a[href="#preview"]', ->
|
$(document).on "click", '#translationNav a[href="#preview"]', ->
|
||||||
$('#preview .problem-content').html(cm.getValue())
|
$('#preview .problem-content').html(cm.getValue())
|
||||||
Loading…
Reference in New Issue
Block a user