这有效:
$('#products.table tr').click ->
$(@).toggleClass('row_selected')
这不会:
$('#products.table tr').live 'click', (event) ->
$(@).toggleClass('row_selected')
浏览器控制台错误:
[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)
我错过了什么?