Give Where Most Needed
Your gift to the Global Advance Fund sends, equips, and cares for disciple-makers among the least-reached. Learn more.
', buttons: { ok: { btnText: 'Ok' }, cancel: false } }); } return false; }); var amountField = givingForm.find('.amount'); var fixedAmountRadioButtons = givingForm.find("input[name=campaignFixedAmount]"); var customAmount = $('#campaignFixedAmount-350-custom'); fixedAmountRadioButtons.on('change', function (event) { if(customAmount.length && $(this).attr('id') === customAmount.attr('id')) { amountField.val('').focus(); } else { amountField.val(this.value); } }); amountField.on('input', function (event) { var amountExists = $('#campaignFixedAmount-350-' + parseFloat(this.value).toFixed(2).replace('.', '\\.')); if (amountExists.length) { amountExists.prop("checked", true); } else if(customAmount.length) { customAmount.prop("checked", true); } else { fixedAmountRadioButtons.prop("checked", false); } }); });