Paddle.Spinner.show()
Shows a loading spinner.
Use Paddle.Spinner.show()
to show a loading spinner. The spinner appears full screen on a darkened background.
Not needed when working with overlay checkout, as overlay checkout automatically shows a spinner when a checkout is loading.
Typically paired with the Paddle.Spinner.hide()
method when loading an inline checkout in response to an event.
Example
This example shows how Paddle.Spinner.show()
can be called as part of an open checkout function.
eventCallback
is used in Paddle.Initialize()
to call Paddle.Spinner.hide()
when the checkout.loaded
event is emitted.
12345678910111213141516171819201<!-- Checkout button -->
2<button onclick="openCheckout();">Buy</button>
3
4<!-- Inline checkout container -->
5<div class="checkout-container"></div>
6
7<script type="text/javascript">
8 Paddle.Initialize({
9 token: 'live_7d279f61a3499fed520f7cd8c08',
10 // Event callback to hide spinner once `checkout.loaded` is emitted
11 eventCallback: function(data) {
12 console.log(data);
13 if (data.name == "checkout.loaded") {
14 Paddle.Spinner.hide();
15 };
16 }
17 });
18
19 function openCheckout() {
20 var items = [{
Related pages
On this page