adds turbolinks compatibility [#21]

This commit is contained in:
rgarcia
2015-07-27 11:24:11 +02:00
parent 0aaa8169f0
commit 598310c01c

View File

@@ -3,7 +3,11 @@ jQuery ->
toggle_comment = (id) ->
$("#js-comment-form-#{id}").toggle()
$('.js-add-comment-link').click ->
id = $(this).data().id
toggle_comment(id)
false
ready = ->
$('.js-add-comment-link').click ->
id = $(this).data().id
toggle_comment(id)
false
$(document).ready(ready)
$(document).on('page:load', ready)