title: How to get a list of attribute values from checked checkboxes of a certain class
body: <p>I have some mark up like:</p>
  
  <pre><code>&lt;input type="checkbox" class="fieldapprovalcheckbox" data-invoicelineid=3 /&gt;
  &lt;input type="checkbox" class="fieldapprovalcheckbox" data-invoicelineid=4 /&gt;
  &lt;input type="checkbox" class="fieldapprovalcheckbox" data-invoicelineid=5 /&gt;
  </code></pre>
  
  <p>Now say all these checkboxes have been checked in jquery how would I get a list of all the data-invoicelineid? ie. It should contain 3,4,5.</p>
  
  <p>I wrote the following but it only gets the first one.</p>
  
  <pre><code>var checkedInvoiceLineIds = $(".fieldeapprovalcheckbox:checked").attr("data-invoicelineid");
  </code></pre>