the code. i don't use CoffeeScript,
HTML
<ul style="line-height: 40px">
<li class="item">三胖</li>
<li class="chunying">王春颖</li>
<li class="zhang">张老师</li>
</ul>
Spinejs
jQuery(function($){
var Users = Spine.Controller.sub({
events: {
"click .item": "click"
},
click: function(event){
alert(event.target.nodeName)
},
});
var user = new Users({
el:".item"
})
});
the image I find the "click" event has bind ,but the function didn't on.
中文
通过chrome的调试,发现.item 绑定了事件,但是点击后并没有运行该函数。