Skip to content

Commit

Permalink
waiting for document ready before loading scriptloader
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermg committed Apr 11, 2015
1 parent 46eb525 commit e531009
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/scriptloader.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ class Scriptloader

scripts = [ 'script-a.js', 'script-b.js' ]

@scriptloader = new Scriptloader 'interpreter.js', scripts, () ->
console.log 'before'
@run()
console.log 'after'
$(document).ready () ->
@scriptloader = new Scriptloader 'interpreter.js', scripts, () ->
console.log 'before'
@run()
console.log 'after'

0 comments on commit e531009

Please sign in to comment.