试图找出完成这项工作的最佳方法:
class Person
constructor: (@el) ->
@el = $(el)
this.bind()
bind: ->
@el.find('.something').on 'click', ->
$(this).hide() # conflict!
this.do_something() # conflict!
do_something: ->
alert 'done!'
我知道我可以使用哈希火箭(=>),然后this.do_something从我的回调中访问,但随后与 冲突callback 'this',因此 jquery 试图选择对象,而不是element '.something'. 如何解决这个问题?