我正在尝试为无序列表的图像制作类似自动滚动/轮播的功能。
当您将鼠标悬停在包含的 div 上时,它会调用一个函数,该函数的工作是为<ul>
$(".thumbs").animate({"margin-top": (currentMargin - 10) + "px"}, function(){
console.log("margin-top" + (currentMargin - 10) + "px");
running=false;
});
我在日志中看到了我想要的正确值,即动画认为它已经完成......但我的 div 没有任何变化。
有没有人知道什么可能使动画功能无法按预期工作?
谢谢