0
时缩短了jQuery是否有可能缩短下面以保存this
和span
这是this
写CSS为家长和孩子
$('.link .partner li a').each(function(index, element) {
var linklogo = $(this).prop('class');
$(this).css({
"background-image":"url(/assets/img/link/"+linklogo+".png)"
});
$(this).find('span').css({
"background-image":"url(/assets/img/link/"+linklogo+".png)"
});
});
作品一种享受!感谢您的帮助! – ngplayground