1

谁能帮助告诉我如何更改此鼠标移动容器的 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"); 
    }); 

谢谢你们

4

1 回答 1

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"); 
}); ​
于 2012-08-20T08:35:23.733 回答