Fundraise Up JS
This module integrates the Fundraise Up JavaScript library into your Drupal site, enabling access to the Fundraise Up JS API. It allows you to embed donation forms and trigger API actions, such as opening a checkout, using simple markup and JavaScript.
This module adds the Fundraise Up JS library to your site, allowing access to
the Fundraise Up JS API.
Setup
After installing the module, go to /admin/config/services/fundraiseup-js and
enter in your site ID.
Usage
Elements
Elements may now be dropped into your markup. For example, button element
markup:
<a href="#ABCDEFGH" style="display: none"></a>
JS API
FundraiseUp JS library methods may be called using the `FundraiseUp` object. For
example:
// Log a console message when the fundraise up checkout open event is triggered.
// See https://fundraiseup.com/docs/javascript-api/#events.
window.FundraiseUp.on('checkoutOpen', function() {
console.log('Opened checkout');
});JS methods that are available through data attributes
This module makes some FundraiseUp JA API methods available via data attributes:
Open checkout
<span data-fundraiseup-js-open-checkout="ABCDEFGHIJK">Donate now to our campaign</span>