1jQuery(document).ready(function () { 2 // Donation suggestion amount select 3 if (jQuery('.pdb-sa').length) { 4 document.forms.wp_paypal_donation_form.donation_amount.forEach(radio => { 5 radio.addEventListener('change', () => { 6 if (document.forms.wp_paypal_donation_form.donation_amount.value == 'custome_amount') { 7 jQuery('input[name="custom_donation_amount"]').attr('disabled', false); 8 } else { 9 jQuery('form[name="wp_paypal_donation_form"] input[name="amount"]').val(document.forms.wp_paypal_donation_form.donation_amount.value) 10 jQuery('input[name="custom_donation_amount"]').val(''); 11 jQuery('input[name="custom_donation_amount"]').attr('disabled', true); 12 } 13 }) 14 }); 15 } 16 17 // Enter custom amount 18 jQuery('input[name="custom_donation_amount"]').on('keyup', function (){ 19 if (jQuery('input[name="donation_amount"]:checked').val() == 'custome_amount') { 20 jQuery('form[name="wp_paypal_donation_form"] input[name="amount"]').val(jQuery(this).val()) 21 } else { 22 jQuery('input[name="custom_donation_amount"]').val(''); 23 jQuery('input[name="custom_donation_amount"]').attr('disabled', true); 24 } 25 }) 26 27// // Function to validate email format 28// function isValidEmail(email) { 29// const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; 30// return re.test(email); 31// } 32 33 34 // Suggestion amount change event 35 jQuery('.suggested-donation-amount').on('click', function(){ 36 jQuery('.suggested-donation-amount.amount-checked').removeClass('amount-checked'); 37 jQuery(this).addClass('amount-checked'); 38 jQuery('.suggested-donation-amount.amount-checked input[type="radio"]').prop("checked", true); 39 40 if (document.forms.wp_paypal_donation_form.donation_amount.value == 'custome_amount') { 41 jQuery('input[name="custom_donation_amount"]').attr('disabled', false); 42 } else { 43 jQuery('form[name="wp_paypal_donation_form"] input[name="amount"]').val(document.forms.wp_paypal_donation_form.donation_amount.value) 44 jQuery('.selected_amount').html(document.forms.wp_paypal_donation_form.donation_amount.value) 45 jQuery('input[name="custom_donation_amount"]').val(''); 46 jQuery('input[name="custom_donation_amount"]').attr('disabled', true); 47 } 48 }) 49 50}) 51 52// Donation popup 53function togglePopup() { 54 jQuery(".popup-modal").toggle(); 55 jQuery('body').toggleClass('model-open'); 56} 57
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.