adds hide/show behaviour to comment forms
This commit is contained in:
9
app/assets/javascripts/comments.js.coffee
Normal file
9
app/assets/javascripts/comments.js.coffee
Normal file
@@ -0,0 +1,9 @@
|
||||
jQuery ->
|
||||
|
||||
toggle_comment = (id) ->
|
||||
$("#js-comment-form-#{id}").toggle()
|
||||
|
||||
$('.js-add-comment-link').click ->
|
||||
id = $(this).data().id
|
||||
toggle_comment(id)
|
||||
false
|
||||
Reference in New Issue
Block a user