A Pen by Fundraise Up Inc. on CodePen.
Created
October 5, 2024 10:37
-
-
Save Apdlrcjafg19/620492dd61ad85ce92a6f91ac220213a to your computer and use it in GitHub Desktop.
Javascript API playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Puts Fundraise Up into test mode so that you can experiement with the donationComplete event. --> | |
<script> | |
window.fundraiseup_livemode = false; | |
</script> | |
<!-- End test mode code --> | |
<div class="container"> | |
<ul class="list"> | |
<li class="list-item"> | |
<span class="list-title">JavaScript events demo</span> | |
<span class="list-description">Select the Donate button to launch Checkout. Fired JavaScript events will appear in the console. Remember to clear the console as you try different events.</span> | |
<div class="loading fade-out"><i class="fa-solid fa-spinner-third fa-spin" style="--fa-animation-duration: 1s"></i> Preparing example...</div> | |
<div class="example fade-in"> | |
<a href="#XTGWFZFR" style="display: none"></a> | |
</div> | |
</li> | |
</ul> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Events to try: | |
1. checkoutOpen -> Fires whenever Checkout is opened | |
2. checkoutClose -> Fires whenever Checkout is closed, regardless of whether a conversion occurs. | |
3. donationComplete -> Fires at the point of conversion in Checkout. | |
*/ | |
FundraiseUp.on('checkoutOpen', function(details) { | |
console.log(details); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://codepen.io/fundocs/pen/XWYqQKZ.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment