使用jquery更改mousemove()容器的顶部位置
请任何人告诉我如何更改此mousemove容器的y位置使用jquery更改mousemove()容器的顶部位置,jquery,html,containers,mousemove,Jquery,Html,Containers,Mousemove,请任何人告诉我如何更改此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
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");
});
谢谢大家你们喜欢做什么?在鼠标光标后垂直移动容器?
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");
});