I am trying to push all select elements starting with specific id or name and tried the following but it doesn't seem to work:
var IDs = [];
$("#dynamic_field [id^='product_id']").find("select").each(function(){ IDs.push(this.id); });
alert(IDs.length);
If I don't specify the specific select id or name it works:
var IDs = [];
$("#dynamic_field").find("select").each(function(){ IDs.push(this.id); });
alert(IDs.length);
Any help please.