jQuery 2 级悬停导航和鼠标悬停/鼠标悬停
这是一个有效的示例: http://jsfiddle.net/Y8Tvu/
我有 2 个 UL,每个都填充
LI
。当我将鼠标悬停在 .nav-dayselector ul li a
上时,jQuery 将在第二个 UL
中显示相应的 #hover-days ul li
> (这是必要的,因为实际代码是在 overflow:hidden
打开的轮播中使用的,因此我们需要使用 2 个单独的 UL
并以这种方式显示它们。
这是有效的很好 - 问题是当您将鼠标悬停在弹出的 span
上 (#hover-days ul li span
) 时,#hover-days ul li
会淡出。 (请参阅 jsFiddle 示例)
我需要在鼠标悬停时停止此 fadeOut
跨度,这样您就可以使用菜单并从 :hover span
中选择项目,
但是任何其他与 2 个单独的 UL
一起使用的方法都可以。 jsfiddle 有什么简单的修复方法吗?
Here's a working example: http://jsfiddle.net/Y8Tvu/
I have 2 UL
s, each filled with LI
s. When I hover over .nav-dayselector ul li a
, jQuery is being used to show the corresponding #hover-days ul li
in the second UL
(this is necessary because the actual code is used inside a carousel with overflow:hidden
on , so we need to use 2 separate UL
and show them this way.
This works fine - the issue is that when you hover over the span
that pops up (#hover-days ul li span
), the #hover-days ul li
fades out. (see the jsFiddle example)
I need to stop this fadeOut
while the mouse is over the span, so that you can use the menu and select items from the :hover span
.
Any other way of doing this that works with the 2 separate UL
s would be perfectly fine, though. Any simple fix on the jsfiddle that would work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果你保留对元素的引用,你可以
让它在悬停时停止淡出
但这要求用户先用鼠标指针到达它
顺便说一句,它淡出了
html/css dosent 似乎在我的浏览器中工作(IE 8)
if you keep a reference to the element you can
tell it to stop fading out when its hovered over
but this requiers the user to reach it with the mousepointer before
its faded out
the html/css dosent seem to be working in my browser btw (IE 8)