jqueryの質問に役立つうわさがあります。 http://jsfiddle.net/CrumK/1/
$(document).ready(function() {
// this reads: find the element with ID chat and inside that find every TR element that is the 2nd child of its parent (meaning TABLE).
$("#chat tr:nth-child(2)").css("color", "blue"); // select the second row
// this reads: find the element with ID chat and inside that find every TD element that is the 2nd child of its parent (meaning TR)
$("#chat td:nth-child(2)").css("background", "red"); // select every second TD
// select the second TD of the second TR inside the #chat element
$("#chat tr:nth-child(2) td:nth-child(2)").css("background", "green"); // select the second row
});
ここにあなたのjQueryの質問のHTMLでJSfiddleです:http://jsfiddle.net/CrumK/ – kasdega
私は非常にあなたが離れてこれらの質問を分割お勧めします。 – kasdega
あなたはそれらを分割して良かった!あなたのために働く答えを受け入れることを忘れないでください。 – kasdega