title: How to know if PayPal Smart Payment Button has finished rendering
body: <p>I'm trying to <a href="https://developer.paypal.com/docs/checkout/integrate/#2-add-the-paypal-javascript-sdk-to-your-web-page" rel="nofollow noreferrer">add the PayPal Smart Payment button to my website</a>. The HTML container for rendering the button is received through an AJAX request with the <code>paypal.Buttons.render()</code> method called <code>onsuccess</code> of the AJAX request. Now everything works well, except the button takes some time render on the site and become active. I'd like to hint my users that the button is rendering or loading, so they don't stay in the dark when the AJAX request returns and no button is shown. Is there a way to know when the button has completely rendered?</p>
  
  <pre><code>$.ajax({
    url: example/foler,
    data: data,
    success: success(data)
  });
  
  function success(data) {
    // data = &lt;div id='paypal-button-container'&gt;&lt;/div&gt;
    paypal.Buttons().render('#paypal-button-container');
  
    // Display "Button Loading..."
    // Find out if button has completely rendered, then turn off "button loading..."
  }
  </code></pre>