# makecommerce/1.0.2/scripts/parcelmachine.js

MakeCommerce for WooCommerce, version 1.0.2. 16 lines.

- Page: https://pluginprobe.com/plugins/makecommerce/1.0.2/code/scripts/parcelmachine.js
- Raw: https://pluginprobe.com/plugins/makecommerce/1.0.2/raw/scripts/parcelmachine.js
- Modified: 2016-07-12T11:58:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/makecommerce/1.0.2/code/scripts/parcelmachine.js#L10-L20`.

```javascript
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 '<strong>'+texts[0]+'</strong>' + (texts[1] ? '<br/><small>'+texts[1]+'</small>' : '');
			}
		});
	});
});

```
