Rename JS behaviors
This commit is contained in:
parent
918dc87376
commit
5d3fb35cd1
5
app/assets/javascripts/behaviors/details_behavior.coffee
Normal file
5
app/assets/javascripts/behaviors/details_behavior.coffee
Normal file
|
@ -0,0 +1,5 @@
|
|||
$ ->
|
||||
$("body").on "click", ".js-details-target", ->
|
||||
container = $(@).closest(".js-details-container")
|
||||
|
||||
container.toggleClass("open")
|
5
app/assets/javascripts/behaviors/toggler_behavior.coffee
Normal file
5
app/assets/javascripts/behaviors/toggler_behavior.coffee
Normal file
|
@ -0,0 +1,5 @@
|
|||
$ ->
|
||||
$("body").on "click", ".js-toggler-target", ->
|
||||
container = $(@).closest(".js-toggler-container")
|
||||
|
||||
container.toggleClass("on")
|
|
@ -1,5 +0,0 @@
|
|||
$ ->
|
||||
$("body").on "click", ".js-details-target", ->
|
||||
container = $(@).closest ".js-details-container"
|
||||
|
||||
container.toggleClass "open"
|
|
@ -1,5 +0,0 @@
|
|||
$ ->
|
||||
$("body").on "click", ".js-toggler-target", ->
|
||||
container = $(@).closest ".js-toggler-container"
|
||||
|
||||
container.toggleClass "on"
|
Loading…
Reference in a new issue