jQuery/:first

解説 要素集合のうち、最初のものを選択
sample1
  • 1-1
  • 2-1
  • 3-1
sample1code
$(function(){
  $("#sample1Ul li:first").css("color", "red");
});