This works:
$('#products.table tr').click ->
$(@).toggleClass('row_selected')
This doesn't:
$('#products.table tr').live 'click', (event) ->
$(@).toggleClass('row_selected')
Error in browser's console:
[Error] TypeError: 'undefined' is not a function (evaluating '$('#products.table tr').live')
ready (products.js, line 10)
fire (jquery.js, line 3049)
fireWith (jquery.js, line 3161)
ready (jquery.js, line 434)
completed (jquery.js, line 105)
What am I missing?