I have a a handful of dynamically generated inputs. Some have IDs, some do not.I also have an array of IDs. I need to loop through the array of IDs and input the next available ID into the next input without a value. I have tried
$.each(event_array, function(intIndex, objValue){
$('.event-data').find('.event-id').each(function(i){
$(".event-id:empty").val(objValue);
});
});
And
$('.event-data').find('.event-id').each(function(i){
$(".event-id").val(event_array[i]);
});
Obviously the second one doesn't search for the value of the input and the first one uses :empty which I have found out is not for what I am using it for.
Any idea what I need to use for this to work? Thanks!!