this.remove()不是函数。怎么来的?变量作用域:this.remove不是函数
var vehicle = function() {
return {
init: function() {
jQuery('.vehicle-year-profile .options .delete').bind('click', function (e) {
e.preventDefault();
this.remove();
});
},
remove: function() {
alert('test');
}
}
}();
jQuery().ready(vehicle.init);
对不起,我感到困惑。我试图调用我自己的“删除”功能。这只是一个管理我的页面上的车辆的课程。这是它的开始,它将比只是init/remove有更多的功能。
您是否想调用jQuery的remove方法来移除DOM元素或提醒'test'的自定义事件? – Harmen 2010-09-20 18:33:26