2012-03-28 143 views
3

我正在使用http://cloud.github.com/downloads/emberjs/ember.js/ember-0.9.5.js,我不确定如何使用mouseenter和mouseleave事件。我的代码在下面,click事件工作得很好。我如何使mouseenter和mouseleave事件起作用?里面Ember.js如何使用mouseenter和mouseleave事件?

window.App = Ember.Application.create() 

TestView = Ember.View.create 
    template: Ember.Handlebars.compile 'This is the view' 
    click: (evt) -> 
    console.log 'clicked' 
    mouseenter: (evt) -> 
    console.log 'mouse enter' 
    mouseleave: (evt) -> 
    console.log 'mouse leave' 

TestView.append() 

回答

相关问题