7
这个伟大的工程CoffeeScript的脂肪箭头访问不是父“这个”
@nav.on 'click', ->
_this.mover _this.nav.index $(@)
,但我想知道如果我可以用一份丰厚的箭头,而不是像这样
@nav.on 'click', =>
@mover @nav.index $(????)
但我会到位@
这将导致this
而不是_this
?
如果你的'@ nav'条目有嵌套元素,你应该使用'ev.currentTarget' - 在集合中找不到后代。 – 2012-04-21 12:07:49