rewrite snippets.js in coffeescript
This commit is contained in:
parent
f8b588808e
commit
06acc115ed
2 changed files with 6 additions and 9 deletions
|
@ -1,9 +0,0 @@
|
||||||
$(document).ready(function(){
|
|
||||||
$("#snippets-table .snippet").live('click', function(e){
|
|
||||||
if(e.target.nodeName != "A" && e.target.nodeName != "INPUT") {
|
|
||||||
location.href = $(this).attr("url");
|
|
||||||
e.stopPropagation();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
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