【发布时间】:2011-10-19 12:33:13
【问题描述】:
我用 jQuery 编写了一个非常简单的脚本。这个想法是淡化所有不透明的链接除了链接是图像。
这是我的代码:
$('#content_wrapper a, #footer_wrapper a, .dcmenu_market_link a').not('a img').each(function() {
$(this).css("opacity", "0.6");
$(this).hover(function() {
$(this).addClass('fade');
$(this).stop().animate({ opacity: 1.0 }, 600);
},
function() {
$(this).stop().animate({ opacity: 0.6 }, 600);
$(this).removeClass('fade');
});
});
【问题讨论】: