jQuery日本語リファレンス

jQuery does not mean Japanese Query...

Traversing/API/jQuery - Sample Code

filter(expr)


	        
<!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(){
    
    $("div").css("background", "#c8ebcc")
            .filter(".middle")
            .css("border-color", "red");
  });
  </script>
  <style>
  div { width:60px; height:60px; margin:5px; float:left; 
        border:2px white solid;}
  </style>
</head>
<body>
  <div></div>
  <div class="middle"></div>
  <div class="middle"></div>
  <div class="middle"></div>
  <div class="middle"></div>
  <div></div>
</body>
</html>
            
	      
[実行結果]
[filter(expr) の説明へ]