1jQuery(function ($) { 2 3 var BCN_Frontend_Script = { 4 init: function () { 5 //Apply Coupon 6 $(document).on('click', ".bcn-apply-coupon-from-cart", this.apply_coupon); 7 }, 8 apply_coupon: function (e) { 9 e.preventDefault(); 10 BCN_Frontend_Script.block( '.bcn-apply-coupon-from-cart' ); 11 var data = { 12 action: 'bcn_apply_coupon', 13 coupon_code: $(this).attr('data-coupon-code'), 14 bcn_security: bcn_frontend_params.coupon_nonce 15 }; 16 17 $.post(bcn_frontend_params.ajaxurl, data, function (response) { 18 if (true === response.success) { 19 location.reload(true); 20 } else { 21 window.alert(response.data.error); 22 } 23 BCN_Frontend_Script.unblock( '.bcn-apply-coupon-from-cart' ); 24 }); 25 }, 26 block: function (id) { 27 $(id).block({ 28 message: null, 29 overlayCSS: { 30 background: '#fff', 31 opacity: 0.6 32 } 33 }); 34 }, 35 unblock: function (id) { 36 $(id).unblock(); 37 }, 38 }; 39 BCN_Frontend_Script.init(); 40});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.