【发布时间】:2011-04-16 07:59:36
【问题描述】:
代码:
$('.featured').hover(
function() {
$(this).addClass('active');
$('img',this).fadeTo('slow', 0.5, function() {})
},
function() {
$(this).removeClass('active');
$('img',this).fadeTo('slow', 1, function() {})
});
我该如何改进呢?
我记得曾经有人告诉我不要使用
$('img', this) ..
但我不知道如何访问悬停在任何其他方式上的 DIV 中的图像。
谢谢!
【问题讨论】: