1jQuery(document).ready(function ($) { 2 3 $('.form-row, .login-username, .login-password').each(function () { 4 if ($(this).find('input, textarea').val() !== '') { 5 $(this).closest('.form-row, .login-username, .login-password').addClass('focused'); 6 } 7 }); 8 9 $('.form-row .woocommerce-form__input-checkbox').each(function () { 10 if ($(this).is(':checked')) { 11 $(this).closest('.form-row').addClass('checked'); 12 } 13 }); 14 15 $('body').on('change', '.form-row .woocommerce-form__input-checkbox', function () { 16 if ($(this).is(':checked')) { 17 $(this).closest('.form-row').addClass('checked'); 18 } else { 19 $(this).closest('.form-row').removeClass('checked'); 20 } 21 }); 22 23 $('.form-row input, .form-row textarea, .login-username input, .login-password input').on('focusin', function (e) { 24 $(this).closest('.form-row, .login-username, .login-password').addClass('focused'); 25 }); 26 27 $('.form-row input, .form-row textarea, .login-username input, .login-password input').on('focusout change', function (e) { 28 29 if (!$(this).window) 30 return; 31 console.log($(this)); 32 if ($(this).val() !== '') { 33 $(this).closest('.form-row, .login-username, .login-password').addClass('focused'); 34 } else { 35 $(this).closest('.form-row, .login-username, .login-password').removeClass('focused'); 36 } 37 }); 38 39 40 41 $(document.body).on('update_checkout checkout_error', function () { 42 43 var notyf = new Notyf({ 44 duration: 200000, 45 ripple: false, 46 position: { x: 'center', y: 'bottom' }, 47 dismissible: true, 48 }); 49 50 var htmlError = '', 51 htmlMessage = '', 52 htmlSuccess = ''; 53 54 if ($('.woocommerce-error li').length > 0) { 55 56 $('.woocommerce-error li').each(function () { 57 console.log($(this).html()); 58 htmlError += $(this).html(); 59 htmlError += '<br>'; 60 }); 61 notyf.error(htmlError); 62 } 63 64 if ($('.woocommerce-message').length > 0) { 65 htmlMessage += $('.woocommerce-message').html(); 66 notyf.success(htmlMessage); 67 } 68 69 $('.woocommerce-error, .woocommerce-message').remove(); 70 }); 71 72 jQuery("#delivery__type p").removeClass("form-row"); 73 74 jQuery(".custom__order__button a").on("click", function () { 75 jQuery('.btn-submit').trigger('click'); 76 }); 77 78}); 79 80function naturezaApplyCoupon() { 81 82 var $ = jQuery, 83 couponText = $('.coupon_overview__input').val(); 84 85 $('.checkout_coupon #coupon_code').val(couponText); 86 $('.checkout_coupon').submit(); 87 88}
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.