why these outcommented selection methods dont work?

why these outcommented selection methods dont work?

these outcommented selection methods dont work,
i cant see why
it was about just experimenting
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
  5. </script>
  6. <script>
  7. $(document).ready(function(){
  8.   $("button").click(function(){
  9.     $("#div1").fadeIn();
  10.     $("#div2").fadeIn("slow");
  11.     $("#div3").fadeIn(3000);
  12.     $("#div3").css('background-color','blue');
  13.   });
  14. });


  15. $(document).ready(function(){
  16.   $("#div1").click(function(){
  17.     $('.effekt :nth-child(2)').prev().css('background-color','purple');
  18.     
  19. ////////////following selection methods dont work, why?
  20.  //   $('.effekt :nth-child(3)').prev().css('background-color','orange'); //but previous one is the same!
  21.  //   $('.effekt :nth-child(2)').css('background-color','orange');
  22.  //   $('#div3').prev().css('background-color','orange');
  23.  //   $(this).next().css('background-color','orange');
  24.  //   $('#div1').next().css('background-color','orange');
  25. //---------------------------------------------------------
  26.     $("#div2").css('background-color','grey');
  27.     $("#div3").css('background-color','gold');
  28.  });
  29. });


  30. $(document).ready(function(){
  31.   $("#rejto").click(function(){
  32.     $("body .effekt div").hide();
  33. }); });
  34. </script>
  35. </head>

  36. <body>
  37. <p>fadeIn()-hide()-css</p>
  38. <button>click to show</button>
  39. <br><br>

  40. <div class="effekt">
  41. <div id="div1" style="width:80px;height:20px;display:none;background-color:red;"></div><br>
  42. <div id="div2" style="width:80px;height:20px;display:none;background-color:green;"></div><br>
  43. <div id="div3" style="width:80px;height:20px;display:none;background-color:blue;"></div><br>
  44. </div>
  45. <br>
  46. <button id="rejto">hide all</button>
  47. </body>
  48. </html>