Commit
06acc115ed8e5641932f85568c6d03dcb30c9923
rewrite snippets.js in coffeescript
| @@ -1,9 +0,0 @@ |
| @@ -1,9 +0,0 @@ |
1
| -$(document).ready(function(){ |
| |
2
| - $("#snippets-table .snippet").live('click', function(e){ |
| |
3
| - if(e.target.nodeName != "A" && e.target.nodeName != "INPUT") { |
| |
4
| - location.href = $(this).attr("url"); |
| |
5
| - e.stopPropagation(); |
| |
6
| - return false; |
| |
7
| - } |
| |
8
| - }); |
| |
9
| -}); |
| |
| @@ -0,0 +1,6 @@ |
| @@ -0,0 +1,6 @@ |
| |
1
| +$ -> |
| |
2
| + $('#snippets-table .snippet').live 'click', (e) -> |
| |
3
| + if e.target.nodeName isnt 'A' and e.target.nodeName isnt 'INPUT' |
| |
4
| + location.href = $(@).attr 'url' |
| |
5
| + e.stopPropagation() |
| |
6
| + false |