2013-07-08 152 views
0

嘿傢伙我只是嘗試在coffeescript中實現我的更改事件,但它不工作。將任何幫助我jquery change event not working in coffeescript

$('#subscription_id").on "change", -> 
console.log "Hello" 
outputs = $(this).val() 

if outputs 
$('#subscription_id').prop "disable", "false" 
else 
$('##subscription_id').prop "disable", "true" 

回答

11

的顏色顯示問題:

$('#subscription_id").on "change" 

或許應該

$('#subscription_id').on "change"