http://www.zhangxinxu.com/wordpress/?p=1328
powerfloat万能浮动层下拉层插件现在用ajax加载的页面无法用,用live的方式来修改。
原代码:
switch (s.eventType) {
case "hover": {
$(this).hover(function() {
init(s, $(this));
var numShowDelay = parseInt(s.showDelay, 10), hoverTimer;
//鼠标hover延时
if (numShowDelay) {
if (hoverTimer) {
clearTimeout(hoverTimer);
}
hoverTimer = setTimeout(function() {
o.targetGet();
}, numShowDelay);
} else {
o.targetGet();
}
}, function() {
o.flagDisplay = false;
o.targetHold();
if (s.hoverHold) {
setTimeout(function() {
o.displayDetect();
}, 200);
} else {
o.displayDetect();
}
});
if (s.hoverFollow) {
//鼠标跟随
$(this).mousemove(function(e) {
o.cacheData.left = e.pageX;
o.cacheData.top = e.pageY;
o.targetGet();
return false;
});
}
break;
}
请问应该如何改成用live任何时候都可以用的。