I want to update all dropdowns by clicking on checkbox. I'm using foreach to get all the selected checkboxes.
This will update all on the page but I want to accomplish this using the class name not the field name
$('select[name=order_status] option[value=1]').attr('selected', 'selected');
I want something like this ".shipping_'+do_csv+'
$('.option_completed').click(function() {
var do_csv = [];
$("input[name='options[]']:checked").each(function() {
do_csv.push($(this).val());
$(".shipping_'+do_csv+' option[value=1]").attr('selected', 'selected');
});
});