With the following jquery statement I select an array of elements:
selectedSupplierIds = $('.supplierListCheckbox:checked');
I need to select the ids from these elements. Can I do this without creating an array and pushing the ids in a for loop?
You can use .map() to get an array of anything based on your object selection...in this case your just want the .id property from each, like this:
var arr = $('.supplierListCheckbox:checked').map(function() {
return this.id;
}).get();