jQuery/next()

解説
指定した要素の次を取得
sample1
  • list1
  • list2
  • list3
sample1code
$(function(){
  $("#sample1Btn").click(function(){
    $("li:eq(0)").next().css("color","red");
  });
});
sample2
  • element1
  • element2
  • element3
sample2code
$(function(){
  $("ul#sample2 li").click(function(){
  	$(this).next().toggle("fast")
  })
});