有人可以帮忙告诉我如何更改此mousemove容器的y位置。
container.find(".item_over").mousemove(function(e) {
var offset = container.offset();
x = e.pageX - offset.left;
var currentZone = Math.floor(x / zoneWidth);
$(this).find("li").css("display", "none");
$(this).find("li:eq(" + currentZone + ")").css("display", "block");
});
谢谢你们
答案 0 :(得分:0)
container.find(".item_over").mousemove(function(e) {
var offset = container.offset(), //comma to seperate variables
x = e.pageX - offset.left,
y = e.pageY - offset.top, //gets Y, not sure how you intend to use it ??
currentZone = Math.floor(x / zoneWidth);
$(this).find("li").css("display", "none");
$(this).find("li:eq(" + currentZone + ")").css("display", "block");
});