adds turbolinks compatibility [#21]
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user