title: Check multiple checkboxes using jquery
body: <p>I have an array something like </p>
  
  <pre><code>var values = ['1','3','4','5'];
  </code></pre>
  
  <p>I have the list of checkboxes</p>
  
  <pre><code>&lt;div id='list'&gt;
      &lt;input type='checkbox' value='1' /&gt;
      &lt;input type='checkbox' value='2' /&gt;
      &lt;input type='checkbox' value='3' /&gt;
      &lt;input type='checkbox' value='4' /&gt;
      &lt;input type='checkbox' value='5' /&gt;
      &lt;input type='checkbox' value='6' /&gt;
      &lt;input type='checkbox' value='7' /&gt;
      &lt;input type='checkbox' value='8' /&gt;
      &lt;input type='checkbox' value='9' /&gt;
      &lt;input type='checkbox' value='10' /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>now I want to select checkboxes whose values lies within array values. I have done this </p>
  
  <pre><code>for(var i = 0; i &lt; values.length; i++)
      $("#list [value=" + values[i] + "]").attr("checked", "checked");
  </code></pre>
  
  <p>it is working fine but can I do it without for loop.</p>
  
  <p>Thank you in advance to helpers.</p>