jquery参数传递问题
_hover: function(id) {
var self = this,
_config = self.config,
_cache = self.cache;
this.id=id;
//鼠标悬停
$(_config.list + ' li').hover(function(){
/* 1 * /
alert(id);
}
我现在就是想把最上边的那个参数id传到1所在的那个function里,但实现不了,这样一打印就像是 undifine,怎么破??
var self = this,
_config = self.config,
_cache = self.cache;
this.id=id;
//鼠标悬停
$(_config.list + ' li').hover(function(){
/* 1 * /
alert(id);
}
我现在就是想把最上边的那个参数id传到1所在的那个function里,但实现不了,这样一打印就像是 undifine,怎么破??
...全文


