jQuery日本語リファレンス

jQuery does not mean Japanese Query...

Selectors/API/jQuery - Sample Code

:parent


            
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <script src="/jquery/js/jquery.js"></script>
  
  <script>
  $(document).ready(function(){
    $("#run").click(function(){
      $("td:parent").fadeTo(1500, 0.3);
    });
  });
  </script>
  <style>
td { width:40px; background:green; }
  </style>
</head>
<body>
  <input type="button" id="run" value="Run" />
  <table border="1">

    <tr><td>Value 1</td><td></td></tr>
    <tr><td></td><td>Value 2</td></tr>
  </table>
</body>
</html>
            
          
[実行結果]
[:parent の説明へ]