Amrit Dhungana
Amrit Dhungana

Reputation: 4485

Jquery change event not working in coffeescript

hey guys I have just try to implement my change event in coffeescript but its not working. Will any help me

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

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

Upvotes: 1

Views: 6974

Answers (1)

Laurent S.
Laurent S.

Reputation: 6946

The colors indicate the problem :

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

Should probably be

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

Upvotes: 11

Related Questions