jQuery日本語リファレンス

jQuery does not mean Japanese Query...

Selectors/API/jQuery - Sample Code

:hidden


            
<!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(){
    $("#show").click(function(){
      // in some browsers :hidden includes head, title, script, etc... so limit to body
      $("span:first").text("Found " + $(":hidden", document.body).length + 
                         " hidden elements total.");
      $("div:hidden").show(3000);
      $("span:last").text("Found " + $("input:hidden").length + " hidden inputs.");
    });
  });
  </script>
  <style>
  div { width:70px; height:40px; background:#ee77ff; margin:5px; float:left; }
  span { display:block; clear:left; color:red; }
  .starthidden { display:none; }
  </style>
</head>
<body>
  <input type="button" id="show" value="Show" />
  <span></span>

  <div></div>
  <div style="display:none;">Hider!</div>
  <div></div>
  <div class="starthidden">Hider!</div>
  <div></div>
  <form>
    <input type="hidden" />
    <input type="hidden" />

    <input type="hidden" />
  </form>
  <span>
  </span>
</body>
</html>
            
          
[実行結果]
[:hidden の説明へ]