title: jquery how to filter a element from array value
body: <p>In my form i should apply two variety's of class based on the existence in array for that how do i filter?</p>
  
  <p>this is my try:</p>
  
  <pre><code>&lt;form&gt;
  
      &lt;input type="checkbox" value="one" /&gt;
      &lt;input type="checkbox" value="two" /&gt;
      &lt;input type="checkbox" value="three" /&gt;
      &lt;input type="checkbox" value="four" /&gt;
      &lt;input type="checkbox" value="five" /&gt;
  
  &lt;/form&gt;
  
  var names = ["one","two","three"];
  
  
  $(":checkbox", "form").filter(function(){
      return $(this).val() === names
  }).addClass("blue")
  
  $(":checkbox", "form").filter(function(){
      return $(this).val() !== names
  }).addClass("green")
  </code></pre>
  
  <p>but not works.. any correct way to get it done</p>
  
  <p><a href="http://jsfiddle.net/aGYWm/" rel="nofollow">here is the fiddle</a></p>