$(‘#taskList > div:nth-child(odd)’).addClass(‘odd’);
$(‘#list li:nth-child(odd)’).css(‘color’,’red’);
$(‘#list li:nth-child(even)’).css(‘color’,’blue’);
web メモ
$(‘#taskList > div:nth-child(odd)’).addClass(‘odd’);
$(‘#list li:nth-child(odd)’).css(‘color’,’red’);
$(‘#list li:nth-child(even)’).css(‘color’,’blue’);