1/** 2 * Infixs Correios Automático - Cart JS Front-End. 3 * 4 * @since 1.2.9 5 */ 6 7/** 8 * @global {Object} infxsCorreiosAutomaticoCart - Global object for Infixs Correios Automático. 9 */ 10 11jQuery(function ($) { 12 /** 13 * Cart class. 14 */ 15 const InfixsCorreiosAutomaticoFrontCart = { 16 /** 17 * Initialize the class. 18 */ 19 init() { 20 if ( 21 infxsCorreiosAutomaticoCart?.options?.autoCalculateCartShippingPostcode 22 ) { 23 this.applyAutoCalculateCartShippingPostcode(); 24 } 25 }, 26 27 /** 28 * Apply auto calculate cart shipping postcode. 29 */ 30 applyAutoCalculateCartShippingPostcode() { 31 $(document).on( 32 "input", 33 "#calc_shipping_postcode", 34 this.updateCartShippingPostcode.bind(this) 35 ); 36 }, 37 38 /** 39 * Update cart shipping postcode. 40 * 41 * @param {Event} event - Event object. 42 */ 43 updateCartShippingPostcode(event) { 44 $element = $(event.target); 45 const postcode = $element.val().replace(/\D/g, ""); 46 47 if (postcode.length === 8) { 48 $('button[name="calc_shipping"]').click(); 49 //$element.closest("form").trigger("submit"); 50 } 51 }, 52 }; 53 54 InfixsCorreiosAutomaticoFrontCart.init(); 55});
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.