I have some mark up like:
<input type="checkbox" class="fieldapprovalcheckbox" data-invoicelineid=3 />
<input type="checkbox" class="fieldapprovalcheckbox" data-invoicelineid=4 />
<input type="checkbox" class="fieldapprovalcheckbox" data-invoicelineid=5 />
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.
I wrote the following but it only gets the first one.
var checkedInvoiceLineIds = $(".fieldeapprovalcheckbox:checked").attr("data-invoicelineid");