[英]JQuery Tabs UI - Menu rotation - OnMouseOver and OnMouseOut
I am currently working with a tab menu which cycles through automatically. 我目前正在使用自动循环显示的标签菜单。 Once I mouseover one of the tabs the "rotation" should stop on the selected tab and when I mouseout it should continue rotating from the selected tab item.
当我将鼠标悬停在一个选项卡上时,“旋转”应该在所选的选项卡上停止,当我将其滑出时,它应该从所选的选项卡项继续旋转。
$("#featured > ul").tabs({
event: 'mouseover',
fx: { opacity: "toggle"} })
.tabs("rotate", 10000, true);
At the moment the onmouseover selects the correct tab but it keeps rotating. 目前,鼠标悬停会选择正确的标签,但它会不断旋转。
I have been stuck on this for AGES so any help would be really appreciated. 我在AGES上一直受此困扰,因此我们将不胜感激。
Thanks for your time.. 谢谢你的时间..
You can stop rotation by setting the first argument to 0
or null
: 您可以通过将第一个参数设置为
0
或null
来停止旋转:
.tabs("rotate", 0);
So I would imagine that you can simply do that on mouseover
, and reset back to your defaults on mouseout
: 因此,我想您可以在
mouseover
上执行此操作,并在mouseout
上将其重置为默认值:
$("#featured > ul").mouseover(function() {
$(this).tabs("rotate", 0);
}).mouseout(function() {
$(this).tabs("rotate", 10000, true);
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.