jQuery(function(){
jQuery(document).on('updated_checkout', function(){
jQuery(".parcel_machine_checkout").css('display', 'none');
jQuery('.shipping_method:checked').each(function(){
var method = jQuery(this).val(), display;
jQuery("#parcel_machine_checkout_"+method).css('display', 'table-row');
});
jQuery('.select-postmachine select').select2({
formatResult: function(item) {
var texts = item.text.split(' - ', 2);
return ''+texts[0]+'' + (texts[1] ? '
'+texts[1]+'' : '');
}
});
});
});