【发布时间】:2012-02-26 00:08:43
【问题描述】:
我想在子菜单中淡入淡出并同时选择位置。
喜欢酷酷的 Coda-Tooltip (http://panic.com/coda/) 超过“下载”。
这次我的代码只是做了淡入淡出:
$(document).ready(function(){
$('#access').hover(function () {
$(this).children('ul').fadeIn();
$(this).children('ul')...position();
}, function () {
$(this).children('ul').fadeOut('slow');
$(this).children('ul')...position();
});
});
谢谢 英戈
现在我这样做:
$(document).ready(function(){
$('#access').hover(function () {
$(this).children('ul').stop().animate({opacity:1, paddingTop:'10px'}, 400);
}, function () {
$(this).children('ul').stop().animate({opacity:0, paddingTop:'0px'}, 300);
});
});
Fadein 和填充效果很好。但不是通过淡出。我的错误是什么?
【问题讨论】:
-
这个平行动画的答案stackoverflow.com/questions/811750/…
-
在我的回答中查看示例。我一直在使用它并且非常喜欢它。
标签: jquery position jquery-animate parallel-processing fade