[英]jQuery Rollover
I'm simply hiding and showing a products descrption on rollover, can it be done better then this? 我只是简单地隐藏和展示翻转时的产品描述,然后做得更好吗?
Its a little buggy when the mouse goes in and out 当鼠标进出时,它有点小车
$("a.roll-over-trigger").hover(
function() {
$(this).next('.altProduct p').slideDown('300');
},
function() {
$(this).next('.altProduct p').slideUp('300');
}
);
a.roll-over-trigger is the image itself a.roll-over-trigger是图像本身
and .altProduct p slides up over half of the image when hovered. 和.altProduct p悬停时会向上滑动图像一半以上。
Here's a link http://tinyurl.com/d8dxd47 这是链接http://tinyurl.com/d8dxd47
Thanks 谢谢
You didn't provide any example, just a guess 您没有提供任何示例,只是一个猜测
$("a.roll-over-trigger").on('hover', function(e) {
$(this).next('.altProduct').find('p').slideToggle('medium');
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.