Javascript with Turbolinks in Rails 4

Posted Over 10 years ago. Visible to the public. Repeats.

If some of your scripts don't work with turbolinks, you should do the following:

ready = ->
  #your code here
  
$(document).ready(ready)
$(document).on('page:load', ready)

konjoot
Last edit
Over 6 years ago
konjoot
Keywords
Javascript, Turbolinks, Rails4
Posted by konjoot to wiki (2013-12-11 15:40)