Last active
October 4, 2016 05:57
-
-
Save syou007/1a6bb47a7ac8a55353f2a2f0811d0cdb to your computer and use it in GitHub Desktop.
Rails5でTurbolinksの挙動が変わってた。 ref: http://qiita.com/syou007/items/fda40f65634bb2fadf36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on 'page:before-change' , -> console.log 'page:before-change' | |
$(document).on 'page:fetch' , -> console.log 'page:fetch' | |
$(document).on 'page:receive' , -> console.log 'page:receive' | |
$(document).on 'page:change' , -> console.log 'page:change' | |
$(document).on 'page:update' , -> console.log 'page:update' | |
$(document).on 'page:load' , -> console.log 'page:load' | |
$(document).on 'ready page:load' , -> console.log 'ready and load' | |
$(document).ready -> console.log '$(document).ready in assets' | |
$(window).on 'load' , -> console.log '$(window).load in assets' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ページ切り替え時(初回ページも対象) | |
$(document).on 'turbolinks:load', -> console.log 'turbolinks:load' | |
# ページ切り替え時(初回ページは対象外) | |
$(document).on 'turbolinks:render', -> console.log 'turbolinks:render' | |
# ページ遷移前 | |
$(document).on 'turbolinks:request-start', -> console.log 'turbolinks:request-start' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment