var ready = function() {
...your javascript goes here...
};
$(document).ready(ready);
$(document).on('page:load', ready); // turbolinks対応
http://stackoverflow.com/questions/18770517/rails-4-how-to-use-document-ready-with-turbo-links
page:load, ready 以外にも
https://github.com/rails/turbolinks/
0 件のコメント:
コメントを投稿