title: looping through an array to check checkboxes
body: <p>Am I on the right tract with this? I'm switching my way of doing this since this works best.</p>
  
  <p>What I am doing is taking an series of numbers </p>
  
  <pre><code>var n = "1,3,8,12,2,19";
  </code></pre>
  
  <p>I have the following for checking the checkbox:</p>
  
  <pre><code>$('#chk1').attr('checked', true)
  </code></pre>
  
  <p>Is there a way to replace the 1 in chk1 with the number in n? I want to loop through the array of numbers and check all the boxes with that number.</p>