【发布时间】:2010-10-17 23:38:31
【问题描述】:
嘿。我试图让这个脚本在 webkit(Safari、Chrome、最新版本)中顺利运行。它在 Firefox 中运行得非常好。此代码在 document.ready 函数中调用:
$('#noScript').remove();
$("#content div.wrapper, #top div.wrapper").hide().stop().fadeIn({duration: 2000, queue: true });
$('#social a')
.children('span').hide()
.next('img').css('opacity', '0.4')
.parent().hover(function(){
$(this).children('img').animate({ opacity : 0.99}, {duration: 100, queue: false })
.prev('span').fadeIn({duration: 200, queue: false });
}, function(){
$(this).children('img').stop().css({ opacity : 0.4})
.prev('span').hide();
});
$('#language').css({opacity: '0.5'}).hover(function() {
$(this).animate({ opacity : 0.99}, {duration: 'fast', queue: false })
}, function(){
$(this).animate({ opacity : 0.5}, {duration: 'fast', queue: false });
});
将鼠标悬停在所选项目上会触发非常缓慢的动画。你可以在这里看到一个活生生的例子:trinkaus.cc
有人知道为什么会这样吗? 亲切的问候 萨沙
【问题讨论】:
标签: jquery performance webkit hover