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