rewrite snippets.js in coffeescript
This commit is contained in:
parent
f8b588808e
commit
06acc115ed
2 changed files with 6 additions and 9 deletions
6
app/assets/javascripts/snippets.js.coffee
Normal file
6
app/assets/javascripts/snippets.js.coffee
Normal file
|
@ -0,0 +1,6 @@
|
|||
$ ->
|
||||
$('#snippets-table .snippet').live 'click', (e) ->
|
||||
if e.target.nodeName isnt 'A' and e.target.nodeName isnt 'INPUT'
|
||||
location.href = $(@).attr 'url'
|
||||
e.stopPropagation()
|
||||
false
|
Loading…
Add table
Add a link
Reference in a new issue