Skip to content

Commit

Permalink
use window load instead of document ready to load codemirror
Browse files Browse the repository at this point in the history
  • Loading branch information
kylesferrazza committed May 20, 2019
1 parent 5a0c912 commit f9dc194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/assets/javascripts/exam.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ function codeMirrorLoad(editor, file) {
});
}

$(document).ready(function(){
$(window).on('load', function(){
console.log("window loaded");
const code = $(".codemirror-textarea").toArray();
code.forEach(initCodeMirror);
});

0 comments on commit f9dc194

Please sign in to comment.