PluginProbe
MakeCommerce for WooCommerce / 2.4.8
MakeCommerce for WooCommerce v2.4.8
4.1.0 4.0.8 trunk 1.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.0 2.2.1 2.2.2 All 96 releases
makecommerce / scripts / parcelmachine.js

parcelmachine.js in MakeCommerce for WooCommerce 2.4.8, at scripts/parcelmachine.js

21 lines 754 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 jQuery(function(){
2 jQuery(document).on('updated_checkout', function(){
3 jQuery(".parcel_machine_checkout").css('display', 'none');
4 jQuery('.shipping_method:checked, .shipping_method[type=hidden]').each(function(){
5 var method = jQuery(this).val(), display;
6 if (method.indexOf(':') > -1) {
7 var tmp = method.split(':');
8 method = tmp[0];
9 }
10 jQuery(".parcel_machine_checkout_"+method).not(':first').remove();
11 jQuery(".parcel_machine_checkout_"+method).css('display', 'table-row');
12 });
13 jQuery('.select-postmachine select').select2({
14 formatResult: function(item) {
15 var texts = item.text.split(' - ', 2);
16 return '<strong>'+texts[0]+'</strong>' + (texts[1] ? '<br/><small>'+texts[1]+'</small>' : '');
17 }
18 });
19 });
20 });
21