2012-03-14 17 views

答えて

3
$(".tweet li").each(function(){ 
    $(this).find("a:eq(0)").addClass("toptweet"); 
}); 
+0

':eq(0)'フィルタは私の答えに入れた ':first'フィルタよりも高速であることに注意してください。 – joshuahealy

0
$("li.tweet").("a:eq(1)").addclass 
3
$('.tweet li').each(function() { 
    $(this).find('a:first').addClass('toptweet'); 
}); 
0
$(".tweet li a:first").addClass('toptweet'); 
関連する問題