提交 be26d272 编写于 作者: D Dmitriy Zaporozhets

Unbind all document.on click/scroll after page fetch

上级 c3c84992
......@@ -50,11 +50,13 @@ window.startSpinner = ->
window.stopSpinner = ->
$('.turbolink-spinner').fadeOut()
window.stopEndlessScroll = ->
window.unbindEvents = ->
$(document).unbind('scroll')
$(document).off('scroll')
$(document).off('click')
document.addEventListener("page:fetch", startSpinner)
document.addEventListener("page:fetch", stopEndlessScroll)
document.addEventListener("page:fetch", unbindEvents)
document.addEventListener("page:receive", stopSpinner)
$ ->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册